当前位置: 代码迷 >> Web前端 >> 让客户ie8浏览器默许使用ie7兼容模式
  详细解决方案

让客户ie8浏览器默许使用ie7兼容模式

热度:207   发布时间:2012-09-04 14:19:30.0
让客户ie8浏览器默认使用ie7兼容模式

让访问的IE8自动调用IE7的渲染模式,这样可以保证最大的兼容性,方法如下:

  1.只需要在页面中加入如下HTTP meta-tag:

?

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
?
  只要IE8一读到这个标签,它就会自动启动IE7兼容模式,保证页面完整展示.

  2.还有一种方法是针对整个网站的,在IIS中加入如下描述符就可以有相同的效果,当然这么做范围更广.

?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-UA-Compatible" value="IE=EmulateIE7">
      </customHeaders>
    </httpProtocol>
</system.webServer>
</configuration>
?

?

  相关解决方案