2013-02-07 160 views
0

当我使用IE黑客时,兼容模式仍然可用。但是如果我删除黑客,它会按预期工作。无法打开IE兼容模式IE浏览器黑屏

黑客(不工作)

<!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" /> 

我的生活我想不通为什么兼容模式不会与该黑客工作。我正在使用IE8。

回答

0

您需要将IE8切换到怪癖模式,对吧? content属性表示您要使用哪种兼容模式。它确实是而不是表示哪个IE版本使用怪癖模式。

试试这个meta标签:

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