第一种办法:在单个的页面中,添加兼容性标记,示例代码如下:
<html>
<head>
<!-- Mimic Internet Explorer 7 -->
<title>我的网页</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
</head>
<body>
<p>内容在此处。</p>
</body>
</html>
在这里添加兼容性标签后,只对当前页面有用,而且必须是在head标签内部,同时也必须是在其他css样式定义或者链接的前面,否则不会产生效果的。
第二种办法:就是在站点的配置文件中,修改web.config文件,使得该网站能够兼容,示例代码如下:
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
<system.webServer>
</configuration>