我在接受特定的@ font-face时遇到了麻烦,特别是Firefox。firefox不接受@ font-family声明
下面是我所做的一个片段:
@font-face {
font-family: "Cursive";
src: url(./MTCORSVA.TTF) format("truetype");
}
.cursivefont {
font-family: "Cursive", Verdana, Tahoma;
font-size: 24pt;
font-weight: bold;
}
@font-face {
font-family: "Impact";
src: url(./impact.ttf) format("truetype");
}
.impactfont16 {
font-family: "Impact", Verdana, Tahoma;
font-size: 16pt;
font-style: italic;
font-weight: bold;
}
@font-face {
font-family: "overrun";
src: url(./AMBROSIA.TTF) format("truetype");
}
.ambrofont {
font-family: "overrun";
font-size: 20pt;
font-weight: bold;
}
<span class=cursivefont>Join the Fight for Gunder’s Bight!</span>
<span class=impactfont16>E F</span>
<span class=ambrofont>UNCLE GLUSSOG'S TALENT PARADE</span>
在Windows IE(边)和Android Opera和Android原生浏览器的所有三项工作。 在Windows Firefox和Chrome以及Android Firefox中,只有impactfont和cursivefont可以工作,并且默认字体用于安装非法字体。虽然偶尔和不一致,Windows Firefox显示正确的字体,但在下次刷新它不。
我试过缓存清除,重新启动和再启动等
开发者控制台中是否有任何错误/消息?我想知道Firefox中的'--debug'或'--debugger'标志是否有帮助(假设有可以在控制台上看到的调试级别消息)。 – halfer
谢谢,哈尔弗,我会尝试,当我得到一分钟。 – user3229958