css Hack,用IE11模拟测试的,条件注释要找真IE去测,模拟的无效

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6 ie"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7 ie"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8 ie"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9 ie"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html>
<!--<![endif]-->

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    div{
        width: 200px;
        height: 200px;
        background: #000;
        /*background: #f009; /* (IE11 - IE6]不包括IE11 */
        /*background: #f00; /* [IE8  - IE11] 包括IE8 */
        /*background: #f00/9; /* [IE8  - IE11) 不包括IE11 */
     /*background: #f009; /* [IE8 - IE11)不包括IE11 */
     /*background: #f009; /* [IE8 - IE11) 不包括IE11 */1
} </style> <!--[if IE 8 ]> <style> div{background-color: #f00;} </style> <![endif]--> </head> <body> <div></div> </body> </html>
原文地址:https://www.cnblogs.com/qiangspecial/p/3760811.html