在这里送上几种IE使用模式!javascript
<meta http-equiv=“X-UA-Compatible” content=“IE=8″>
1. Google Chrome Frame也能够让IE用上Chrome的引擎:java
<meta http-equiv=“X-UA-Compatible” content=“chrome=1″ />
2.强制IE8使用IE7模式来解析web
<meta http-equiv=“X-UA-Compatible” content=“IE=EmulateIE7″><!– IE7 mode –>
//或者
<meta http-equiv=“X-UA-Compatible” content=“IE=7″><!– IE7 mode –>
3.强制IE8使用IE6或IE5模式来解析chrome
<meta http-equiv=“X-UA-Compatible” content=“IE=6″><!– IE6 mode –>浏览器
<meta http-equiv=“X-UA-Compatible” content=“IE=5″><!– IE5 mode –>
4.若是一个特定版本的IE支持所要求的兼容性模式多于一种,如:服务器
<meta http-equiv=“X-UA-Compatible” content=“IE=5; IE=8″ />
二.设定网站服务器以指定预设兼容性模式svn
若是服务器是本身的话,能够在服务器上定义一个自订标头来为它们的网站预设一个特定的文件兼容性模式。这个特定的方法取决于你的网站服务器。网站
录入,下列的 web.config文件使Microsoft Internet Information Services (IIS)能定义一个自订标头以自动使用IE7 mode来编译全部网页。ui
另外还有一块儿其余的解决方案,例如google的google
ie7 – js中是一个JavaScript库(解决IE与W3C标准的冲突的JS库),使微软的Internet Explorer的行为像一个Web标准兼容的浏览器,支持更多的W3C标准,支持CSS二、CSS3选择器。它修复了许多的HTML和CSS问题,并使 得透明PNG在IE五、IE6下正确显示。
使IE5,IE6兼容到IE7模式(推荐)
<!–[if lt IE 7]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta)/IE7.js” type=”text/javascript”></script>
<![endif]–>
使IE5,IE6,IE7兼容到IE8模式
<!–[if lt IE 8]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta)/IE8.js” type=”text/javascript”></script>
<![endif]–>
使IE5,IE6,IE7,IE8兼容到IE9模式
<!–[if lt IE 9]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js”></script> <![endif]–> 解决PNG显示问题