不工作我讀了很多帖子,讓我的字體面的代碼相同,在其他的答案,它仍然沒有工作...字體面都
@font-face {
font-family: 'KlavikaLT';
src: url('Klavika-Light.otf') format('opentype');
}
@font-face {
font-family: 'KlavikaLTit';
src: url('Klavika-LightItalic.otf') format('opentype');
}
@font-face {
font-family: 'KlavikaBD';
src: url('Klavika-Bold.otf') format('opentype');
}
@font-face {
font-family: 'KlavikaBDit';
src: url('Klavika-BoldItalic.otf') format('opentype');
}
@font-face {
font-family: 'KlavikaRG';
src: url('Klavika-Regular.otf') format('opentype');
}
.footerleft
{
font-family: KlavikaLT;
}
.footerright
{
font-family: KlavikaBDit;
}
這是我的示例代碼我使用。字體與樣式表文件位於同一文件夾中。我在哪裏犯了一個錯誤?
編輯1 ,因爲它的工作在我的本地這很有趣,和所有的路徑是正確的。沒有在我的服務器上工作,但我做了與我的其他網站上的代碼相同,它在那裏工作...
檢查瀏覽器開發工具中的網絡選項卡,查看加載文件時是否有錯誤。 – CodingWithSpike
嘗試添加ttf,svg,eot,woff和woff2文件。不要只保留一種類型。你的布勞威爾不支持它,你有問題。 –
有加載字體的網絡標籤錯誤(404),但我檢查了路徑,它是正確的...不知道爲什麼它不工作... – Ashiv3r