IE10不会起作用,IE9,8,7,6,5都可以 

<html>
    <head>
        <title>IE打开就是蓝色背景,白色的字体</title>
        <!--[if IE]>
            <style>
                body { background-color: blue; color: #fff; }
            </style>
        <![endif]-->
    </head>
    <body>
        IE打开就是蓝色背景,白色的字体
    </body>
</html>

 

 

<!--[if IE 6]> 
    可以把样式写在这中间
<![endif]--> 
只有IE6版本可见 
<!--[if lte IE 6]> 
<![endif]--> 
IE6及其以下版本可见 
<!--[if gte IE 6]> 
<![endif]--> 
IE6及其以上版本可见 
<!--[if IE 7]> 
<![endif]--> 
只有IE7版本可见 
<!--[if lte IE 7]> 
<![endif]--> 
IE7及其以下版本可见 
<!--[if gte IE 7]> 
<![endif]--> 
IE7及其以上的版本可见 
<!--[if IE 8]> 
<![endif]--> 
只有IE8版本可见 
<!--[if lte IE 8]> 
<![endif]--> 
IE8及其以下的版本可见 
<!--[if gte IE 8]> 
<![endif]--> 
IE8及其以上的版本可见 
<![if !IE]> 
<![endif]> 
除了IE以外的版本

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-12-11
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2021-09-28
  • 2022-12-23
  • 2022-01-01
  • 2021-08-12
  • 2021-08-21
  • 2021-11-02
相关资源
相似解决方案