ich mit font_face einige Frage habenfont face Datei-URL in Anfrage uri
in CSS:
@font-face{
font-family: 'Optima';
src: url('fonts/OPTIMA_0.woff') format('woff');
font-weight: normal;
font-style: normal;
}
html{
font-family: 'Optima';
}
I $ _SERVER [ 'REQUEST_URI'] für MVC-Routing, wie:
Website .com/main - rufen gemeinsame Seite 'main'
site.com/contacts - rufen gemeinsame Seite 'Kontakte'
site.com/services - rufen Katalogseite 'Dienstleistungen'
site.com/services/serviceA - nennen konkrete Katalogseite 'serviceA'
site.com/services/serviceB - nennen konkrete Katalogseite ‚serviceB '
....
Aber wenn ich klar Browser-Cache auf Seite neu laden, ich habe Fontpath in Anfrage uri, wie: site.com/application/css/fonts/OPTIMA_0.woff, nicht für den Standort .com/services/serviceA
In br owser Adressleiste bekam ich richtig uri
und das Google-Fonts funktioniert gut, aber ich brauche diese ein ..
wie Schriftart Sieht nicht richtig auf Neuladen der Seite laden, aber es auf Seite Stil angewendet.
Die Frage ist also: Wie kann ich das beheben?
gut ... Ich kann nicht diesen Kommentar umgehen Formatierung ... So Pfad rechts in meiner Skripte ist – user2893813
So können Sie mir zeigen die URI für Ihre CSS-Datei? Vielleicht können wir eine darauf basierende Lösung finden. BTW, welche Server-Anwendung verwenden Sie? Wie konfiguriere ich das statische Verzeichnis darin? –
'@ font-face { Schriftfamilie: 'Optima'; src: url ('Fonts/OPTIMA_0.TTF') Format ('Truetype'), URL ('Fonts/OPTIMA_0.eot? #iefix') Format ('embedded-opentype'), /* url ('Fonts /OPTIMA_0.woff2 ') Format (' woff2 '),/* LÄSST DAS PROBLEM HIER */ URL (' Fonts/OPTIMA_0.ttf ') Format (' Truetype '), URL (' Fonts/OPTIMA_0.Optima ') Format ('svg'), URL ('Fonts/OPTIMA_0.woff') Format ('woff'); Schriftgewicht: normal; Schriftart: normal; } ' – user2893813