Bootstrap Glyphicons图标不在服务器上的IE中呈现 [英] Bootstrap Glyphicons icons not rendering in IE on server
问题描述
我创建此问题以分享我最近对奇怪的IE行为的了解。
I create this question to share my recent knowledge of a weird IE behaviour.
我自己和一些Glyphicons正在构建一个Intranet Web应用程序(ASP.NET)在页面上。当我在localhost上运行网站时,使用Visual Studio,没有问题出现。
An intranet web application (ASP.NET) is under construction by myself and some Glyphicons are on a page. When I run the website on localhost, using Visual Studio, no problem appear.
但是当我在IIS服务器上部署它时,图标不再渲染了。
But when I deploy it on the IIS server, icons was not rendering anymore.
情况1:在服务器上
情况2:在localhost上
Situation 2: on localhost
在服务器上查看时,此问题仅出现在IE(此处为v.8)中。 Firefox和Chrome正常工作,在服务器和localhost情况下呈现图标。
This problem only appear in IE (v. 8 here) when viewing it on the server. Firefox and Chrome work properly, rendering the icons in both server and localhost case.
我搜索并找到许多可能的解决方案(MIME类型,字体格式,eso)但没有解析问题。
I search and find many possible solutions (MIME types, fonts format, eso) but nothing resolve the problem.
推荐答案
差不多一小时后,我发现问题出在哪里。
After nearly one hour, I found where was the problem.
在Internet Explorer的兼容性视图设置下,选中了在兼容性视图中显示Intranet站点选项。
In Internet Explorer, under the "Compatibility View Settings", was checked the "Display intranet sites in Compatibility View" option.
当我取消选中它时,图标显示为预期。
When I unchecked it, the icons appears like expected.
所以,不要忘记在其他所有事情之前检查兼容性视图设置......
So, don't forget to check "compatibility view" settings before everything else...
这篇关于Bootstrap Glyphicons图标不在服务器上的IE中呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!