【问题标题】:@font-face doesn't display in firefox@font-face 不显示在 Firefox 中
【发布时间】:2011-10-25 04:31:56
【问题描述】:

我一直在尝试在一个网站上使用@font-face,我使用了 font squirrel 给我的 css,它在 Safari、IE 和 iphone 上看起来不错,但在 Firefox 中却不显示。 我在 Mac OSX Snow Leopard 上有 Firefox 7.0.1。 我在网上搜索并尝试了一些“解决方案”,但都没有奏效。 我想加载这个@font-face 的网站是http://www.utochinredning.se

有人能给我指出一个解决方案的方向吗?

【问题讨论】:

  • 在 FF 6.0 MAC 中为我工作。 FF 7.0 也可以正常工作。
  • 您可能需要在 about:config 中检查您的设置,我知道它们默认是关闭的

标签: css firefox font-face


【解决方案1】:

发布您的代码?

在黑暗中拍摄,但您是否包含了所有适当的字体文件?这是您的@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;
}

【讨论】:

    猜你喜欢
    • 2015-12-26
    • 1970-01-01
    • 2020-09-07
    • 2011-06-15
    • 2013-01-04
    • 1970-01-01
    • 2013-02-07
    • 2012-08-19
    • 2012-11-07
    相关资源
    最近更新 更多