2013-02-07 145 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">