【问题标题】:TFF and WOFF webfonts 404 not found未找到 TFF 和 WOFF webfonts 404
【发布时间】:2013-06-08 12:32:22
【问题描述】:

使用 Firebug 检查时,我在 webfont 文件中找不到 404 文件。

@font-face {
  font-family: "Grotesk";
  font-style: normal;
  font-weight: normal;
  src: url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.eot');
  src: local(Grotesk), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.eot?#iefix') format("embedded-opentype"), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.woff') format("woff"), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.ttf') format("truetype"), url('../../themes/brian2013/css/fonts/grotesk/altehaasgroteskbold-webfont.svg#Grotesk') format("svg");
}

我在这个网站上有其他完美的字体。 EOT 和 SVG 文件工作正常,我检查了其他两个文件的路径,它们对应。

【问题讨论】:

    标签: css webfonts woff


    【解决方案1】:

    检查您的 htaccess 文件以确保您的文件具有正确的 MIME 类型。

    示例

    取自HTML5 Boilerplate

    # Webfonts
    AddType application/vnd.ms-fontobject  eot
    AddType application/x-font-ttf         ttf ttc
    AddType font/opentype                  otf
    AddType application/x-font-woff        woff
    

    【讨论】:

      猜你喜欢
      • 2016-10-20
      • 1970-01-01
      • 2021-09-12
      • 1970-01-01
      • 2016-09-29
      • 2011-04-17
      • 2021-03-21
      • 2017-04-04
      • 2016-10-06
      相关资源
      最近更新 更多