一句代码解决IE8兼容问题(兼容性视图)

方法一、要在页面中加入如下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>

方法三、使用IIS admin tool来定义,更为简单。

原文地址:https://www.cnblogs.com/scgw/p/2134249.html