我在其它浏览器上测试过我的@font-face,都能正常显示字体,但在Windows上的Firefox浏览器中,虽然加载了字体资源,但仍然显示回退字体。以下是相关代码:
@font-face {
font-family: 'VanillaRegular';
src: url('http://dl.dropbox.com/u/19510731/ttfonts/Vanilla-webfont.eot');
src: url('http://dl.dropbox.com/u/19510731/ttfonts/Vanilla-webfont.eot?#iefix') format('embedded-opentype'),
url('http://dl.dropbox.com/u/19510731/ttfonts/Vanilla-webfont.woff'),
url('http://dl.dropbox.com/u/19510731/ttfonts/Vanilla-webfont.ttf'),
url('http://dl.dropbox.com/u/19510731/ttfonts/Vanilla-webfont.svg#VanillaRegular');
font-weight: normal;
font-style: normal;
}
然后我像这样嵌入它:
.post h3 {
border-bottom:1px solid #c7e7fa;
color:#51514E;
font-size:22px;
font-weight:bold;
line-height:1.4em;
margin:0.25em 0 8px;
padding:0 0 4px;
font-family: "VanillaRegular", Arial, sans-serif;
}
有没有什么我需要为Firefox特别做的事情,还是只需要修改我的代码?
编辑:应该补充说明,使用的是Firefox 8,并且最终产品在Blogger上。
ttf
字体放在最后会发生什么?而且你需要所有其他的备用字体吗? - Blender