我有这个网站,我正在使用Bootstrap 3.0.2 问题是在Chrome中,glyphicons显示完美,但在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中显示图标?
答案 0 :(得分:0)
我发现错误,该网站的前任经理已将.htaccess文件添加到未添加www的模板文件夹中。在加载之前,所以整个网站都加载了www。而模板文件夹加载没有www。将此更改为使用www加载。并修复了一切:)