2017-03-02 2 views
0

Warum wird die Schriftfamilie nicht angewendet?Warum wird Monotype Corsiva nicht im Browser angezeigt?

Hier ist der HTML:

<div class='reelShelf'> 
    <div class="reel creatures" id="horseReel"> 
    <div class="reelTitle">Avi &amp; Rosie</div> 
    <img class="photo" src="photos/creatures/horse1.jpg" onclick="fullView('creatures/horse1')" /> 
    <img class="photo" src="photos/creatures/horse2.jpg" onclick="fullView('creatures/horse2')" /> 
    <img class="photo" src="photos/creatures/horse3.jpg" onclick="fullView('creatures/horse3')" /> 
    <img class="photo" src="photos/creatures/horse4.jpg" onclick="fullView('creatures/horse4')" /> 
    <img class="photo" src="photos/creatures/horse5.jpg" onclick="fullView('creatures/horse5')" /> 
    <img class="photo" src="photos/creatures/horse6.jpg" onclick="fullView('creatures/horse6')" /> 
    <img class="photo" src="photos/creatures/horse7.jpg" onclick="fullView('creatures/horse7')" /> 
    <img class="photo" src="photos/creatures/horse8.jpg" onclick="fullView('creatures/horse8')" /> 
    <img class="photo" src="photos/creatures/horse9.jpg" onclick="fullView('creatures/horse9')" /> 
    </div> 
</div> 

Und hier ist der CSS:

@font-face 
{ 
    font-family: Corsiva; 
    src: url(fonts/MTCORSVA.TFF); 
} 
.reelTitle 
{ 
    color: white; 
    flex: 0 0 auto; 
    width: 100%; 
    font-family: Corsiva; 
} 

Und schließlich ist hier ein Foto als Referenz:
view of web browser

+0

Könnte ein Tippfehler hier sein ?: "src: url (fonts/MTCORSVA.TFF);" (corsIva ..) – Johannes

+0

Nein, dreifach überprüft alle Rechtschreibung. Danke tho! – Jon

+1

Ist die Dateiendung korrekt? Ich habe eine 'MTCORSVA.TTF' auf meinem Computer, aber keine' .TFF'. – Aaroninus

Antwort

0

Sie einfache Anführungszeichen um die vermisste Schriftfamilie.

@font-face 
{ 
    font-family: 'Corsiva'; 
    src: url(fonts/MTCORSVA.TFF); 
} 
.reelTitle 
{ 
    color: white; 
    flex: 0 0 auto; 
    width: 100%; 
    font-family: 'Corsiva'; 
} 
+0

sie nehmen keine Zitate ... – Jon

Verwandte Themen