【发布时间】:2014-10-31 20:14:44
【问题描述】:
我正在使用@font-face - 按照建议,我使用.eot、.woff、.ttf 和.svg。它在 Firefox 中正常显示,但在 Firefox 中不使用并回退到 Helvetica / sans-serif。
正常:
火狐:
CSS:
@font-face {
font-weight: 900;
font-style: normal;
font-family: 'Lato';
src: url('http://static.tumblr.com/cv6ot7o/LREnbhzla/lato-thin.eot');
src: url('http://static.tumblr.com/cv6ot7o/LREnbhzla/lato-thin.eot?#iefix') format('eot'), url('http://static.tumblr.com/cv6ot7o/iQinbhzmp/lato-thin.woff') format('woff'), url('http://static.tumblr.com/cv6ot7o/Lxynbhzok/lato-thin.ttf') format('truetype'), url('http://static.tumblr.com/cv6ot7o/p2Anbj1jl/lato-thin.svg') format('svg');
}
h1 {
font-family: "Lato", "HelveticaNeue-UltraLight", "Helvetica Neue UltraLight", sans-serif;
font-size: 4em;
}
HTML:
<h1>title</h1>
我们如何解决这个问题?
我看到一些类似的问题建议使用字体的本地链接,但我不能在这里使用它。
【问题讨论】:
-
这很可能是由于 Firefox 的原始策略。 stackoverflow.com/a/11616436/301596
标签: html css firefox fonts font-face