不能强制IE8使用IE8模式

时间:2013-01-24 16:19:41

标签: internet-explorer ie8-compatibility-mode ie8-browser-mode

我试图使用:

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />

<meta http-equiv="X-UA-Compatible" content="IE=8" />

我的网站仍然在IE8 compat mode Document Mode IE7 Standards (Page default)打开(我正在使用IE8) - 当我手动检查使用IE8标准网站正确渲染时 - 我如何强制我的网页使用IE8标准默认?这个元标题似乎不起作用......

1 个答案:

答案 0 :(得分:1)

我找到了解决方案 - 它是由来自html5boilerplate的代码引起的:

<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

必须只是<html>

奇怪的是html5boilerplate中的代码会导致IE7标准...