我一直在尝试在网站上使用@font-face,我使用 font squirrel 给我的 css,它在 Safari、IE 和 iphone 中看起来不错,但在 firefox 中它不显示。 我在 Mac OSX Snow Leopard 上安装了 Firefox 7.0.1。 我在网上搜索并尝试了一些“解决方案”,但没有一个奏效。 我想加载这个@font-face 的网站是http://www.utochinredning.se
有人能给我指出可能是解决方案的方向吗?
最佳答案
发布你的代码?
在黑暗中拍摄,但您是否包含了所有合适的字体文件?这是您的@font-face 应该是什么样子的示例(至少是我的样子)
@font-face {
font-family: 'Museo300';
src: url('Museo300-Regular-webfont.eot');
src: url('Museo300-Regular-webfont.eot?#iefix') format('embedded-opentype'),
url('Museo300-Regular-webfont.woff') format('woff'),
url('Museo300-Regular-webfont.ttf') format('truetype'),
url('Museo300-Regular-webfont.svg#Museo300') format('svg');
font-weight: normal;
font-style: normal;
}
我有以下字体文件:
Museo300-Regular-webfont.eot
Museo300-Regular-webfont.svg
Museo300-Regular-webfont.ttf
Museo300-Regular-webfont.woff
然后在你的样式表中:
h1 {
font-family: "Museo300";
font-weight: normal;
}
关于css - @font-face 在 firefox 中不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7881539/