-2

我有这个网站,我正在使用 Bootstrap 3.0.2 问题是在 Chrome 中,字形图标显示完美,但在 IE 和 FF 中它们都没有,在 FF 中,图标显示为带有数字的小框在,在 FF 控制台中,我得到了这个

[11:31:54.537] downloadable font: download failed (font-family: "Glyphicons Halflings" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed
source: http://url.com.com/templates/a_template/fonts/glyphicons-halflings-regular.woff 

[11:31:54.691] downloadable font: download failed (font-family: "Glyphicons Halflings" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed
source: http://url.com/templates/a_template/fonts/glyphicons-halflings-regular.ttf 

[11:31:54.691] downloadable font: no supported format found (font-family: "Glyphicons Halflings" style:normal weight:normal stretch:normal src index:4)
source: (end of source list) 

在 IE 中(到目前为止我尝试过的任何版本)我根本没有图标,控制台显示了这个

CSS3117: A error occurred in a request to the origin of @ font-face. There is limited access to the resource.
glyphicons-halflings-regular.eot

CSS3117: A error occurred in a request to the origin of @ font-face. There is limited access to the resource.
glyphicons-halflings-regular.ttf

CSS3117: A error occurred in a request to the origin of @ font-face. There is limited access to the resource.
glyphicons-halflings-regular.woff

我已经尝试了我在这里和谷歌上找到的所有解决方案,但运气不佳。

在我的模板中,我包括了这些:

<link rel="stylesheet" href="<?php echo $template_path; ?>/css/bootstrap.min.css" media="screen">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="<?php echo $template_path; ?>/js/vendor/bootstrap.min.js"></script>

如何让图标在 IE 和 FF 中显示?

4

1 回答 1

0

我发现了错误,该站点的前任管理员已将 .htaccess 文件添加到未添加 www 的模板文件夹中。在加载之前,所以整个网站都加载了 www。而模板文件夹加载时没有 www。将其更改为使用 www 加载。它修复了一切:)

于 2013-11-12T11:49:23.583 回答