无法打开IE兼容模式与IE黑客攻击

时间:2013-02-07 17:34:48

标签: internet-explorer internet-explorer-8

当我使用IE hacks时,兼容模式仍然可用。但如果我删除黑客攻击,它会按预期工作。

黑客(不起作用)

<!doctype html>

<!--[if lt IE 7]> <html class="no-js ie ie6 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie ie7 lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie ie8 lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />

没有黑客(工作正常)

<!doctype html>

<html class="no-js ie ie8 lt-ie9" lang="en">

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

我为生命而无法弄清楚为什么compat模式不适用于黑客攻击。我正在使用IE8。

1 个答案:

答案 0 :(得分:0)

你需要将IE8切换到怪癖模式,对吧? content属性表示您要使用的兼容模式。 是指使用怪癖模式的IE版本。

试试这个元标记:

<meta http-equiv="X-UA-Compatible" content="IE=5">
相关问题