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

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

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

  还有一种方法是针对整个网站的,在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>

相关文章:

  • 2021-05-26
  • 2022-01-25
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
猜你喜欢
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-07-29
  • 2022-12-23
相关资源
相似解决方案