css - @font-face 在 firefox 中不显示

标签 css firefox font-face

我一直在尝试在网站上使用@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/

相关文章:

JavaScript - 拖动图像 - 最大。 3个

css - @each 循环设置多个属性

html - 无法在 Firefox 中滚动网站

css - Chrome 与 Firefox/IE 中的字体大小不同

javascript - 使用 Node 下载 .ttf 文件

css - @font-face 不工作(Shopify)

css - 多种@font-face格式下载会变慢吗?

css - (SASS) 如何排除导入的文件以编译为 css 文件

html - 如何删除我的部分顶部的额外间距

html - Firefox 位置 : absolute not returning expected results