Explorer自动切换到兼容模式

Explorer自动切换到兼容模式

本文介绍了Internet Explorer自动切换到兼容模式(IE9和IE10)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上的特定网页上,Internet Explorer会自动切换到兼容模式,并尝试在兼容性视图(IE7模式)中呈现网页。

解决方案

在我的例子中,它发生是由于一些CSS使用类型1字体( Helvetica



Internet Explorer从IE9更改了字体渲染不支持旧的Type 1字体。但是仍然有些用户手动安装字体(对我来说,它是Helvetica,在Windows 7,IE9和IE10测试)。



现在如果你使用CSS:
font-family:Helvetica,Arial,sans-serif;
而不是回退为Arial,IE9和IE10切换到兼容模式。

有关详情,请访问:



根据提到的博文,以下方法将有助于解决Web开发人员的问题:




  • 不要使用Helvetica或其他您的CSS中的非标准字体

  • 使用CSS @ font-face功能替换网页字体,以提供您想要的字体

  • 在线网络字体服务,如webfonts.fonts.com

  • 使用条件注释创建IE9特定样式表。


On certain page on my site, Internet Explorer automatically switches to compatibility mode and tries to render the page in compatibility view (IE7 mode). Also the URL gets added to the compatibility view list.

解决方案

In my case, it happened due to some CSS using Type 1 font (Helvetica).

Internet Explorer changed its font-rendering from IE9 (affects IE10 as well) which does not support the old Type 1 fonts. But still some users manually install fonts (for me, it was Helvetica, tested on Windows 7, IE9 and IE10 both).

Now if you use CSS like:font-family: Helvetica, Arial, sans-serif;rather than falling back for Arial, IE9 and IE10 switch to compatibility mode.

More details can be found at: http://bobbyjoneswebdesign.blogspot.com/2011/12/internet-explorer-9-type-1-font-bug.html

As per the mentioned blog post, following approaches would help resolve the problem for the web developers:

  • Don't use Helvetica or other non-standard fonts in your CSS
  • Use a substitute web font with the CSS @font-face feature to serve up your desired fonts
  • Use an online web fonts service like webfonts.fonts.com
  • Use Conditional Comments to create IE9 specific stylesheets.

这篇关于Internet Explorer自动切换到兼容模式(IE9和IE10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 14:59