不工作我读了很多帖子,让我的字体面的代码相同,在其他的答案,它仍然没有工作...字体面都
@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