html - firefox 不加载外部字体

标签 html css apache firefox

我阅读了这篇关于 firefox 和外部字体的文章: http://www.cssbakery.com/2010/07/fixing-firefox-font-face-cross-domain_25.html

它说我应该将一些代码放入我的 apatche 配置中:

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
<FilesMatch "\.(ttf|otf|eot)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

我已经进入路径:apache\apache2.2.22\conf\httpd.conf 并放置这些行,但在 firebug 中,响应 header 根本没有改变。

我想提一下,这篇文章说了一些关于在没有加载的情况下加载标题模块的内容

httpd.conf 文件中加载 header 模块,或者让 firefox 接受外部字体有什么想法吗?

最佳答案

您可能需要在 Apache 配置中的某处使用它:

LoadModule headers_module modules/mod_headers.so

如果您使用的是 Windows,它可能是 mod_headers.dll,或者稍微不同的东西。您可能应该查看 httpd.conf 中的其他 LoadModule 语句以确定合适的版本。

关于html - firefox 不加载外部字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15633213/

相关文章:

html - 让 CSS 网格行填充可用空间

python - 如何从 Django ModelChoiceField 查询集中选择值和标签

javascript - 带有更改高度的 div 的 IE7 错误

PHP 和 Gettext 在我的服务器上不工作

apache - Redmine 在本地主机上工作但无法从网络访问?

html - CSS 网格 : align text in the same column

JavaScript 去除所有的 css 样式信息

php - 当我将 URL 作为参数传递时 Apache 失败

html - 在 CSS 中,是否可以检查是否已经定义了特定的类

css - 使用css调整下划线和文本之间的距离