解决ie8兼容性问题(方法总结)
2011-09-09 11:08
351 查看
方法一、要在页面中加入如下HTTP meta-tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
只要IE8一读到这个标签,它就会自动启动IE7兼容模式,保证页面完整展示。
方法二、针对整个网站,在web.config中加入以下代码:
<?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来定义,更为简单。
在开始——控制面板——管理工具——Initer信息服务——本地计算机——网站——默认网站——属性:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
只要IE8一读到这个标签,它就会自动启动IE7兼容模式,保证页面完整展示。
方法二、针对整个网站,在web.config中加入以下代码:
<?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来定义,更为简单。
在开始——控制面板——管理工具——Initer信息服务——本地计算机——网站——默认网站——属性:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202012/08/12b535e67f7085a59768187ee0dee946.gif)
相关文章推荐
- div+css在各浏览器间的兼容性问题解决方法总结
- Firefox和IE兼容性问题及解决方法总结
- IE6 IE7 IE8 css bug兼容性解决方法总结归纳
- IE6 IE7 IE8 css bug兼容性解决方法总结归纳
- Firefox和IE兼容性问题及解决方法总结
- IE6 IE7 IE8 css bug兼容性解决方法总结归纳
- IE6 IE7 IE8 css bug兼容性解决方法总结归纳
- IE8升级为IE11兼容性错误及解决方法总结
- IE6 IE7 IE8 css bug兼容性解决方法总结归纳
- 【转】 IE6 IE7 IE8 css bug兼容性解决方法总结归纳
- Reporting Service Report (Report Viewer 2005) 与 IE8 兼容性问题及解决方法
- 二分查找(Binary Search)常见问题解决方法总结
- Spark面对OOM问题的解决方法及优化总结
- ubuntu下执行sudo apt-get update(ubuntu16.04换源)遇到的问题及解决方法总结
- Win7系统安装Visual C++ 6.0解决兼容性问题方法
- IE6,IE7,IE8 css bug搜集及浏览器兼容性问题解决方法汇总
- WCF 部署问题 小总结 (HTTP 不能注册的解决方法 和 部署Bat脚本)
- 对Android 平台下SElinux的理解及遇到过的相关问题解决方法总结
- 个人总结:AS升级到3.0后遇到的问题及解决方法