IE条件注释

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IE条件注释相关的知识,希望对你有一定的参考价值。

The following is a list of any conditional comment you'd probably ever need for targeting any version of IE.
  1. <!--[if IE]>
  2. <link rel="stylesheet" href="css/ie.css" type="text/css" />
  3. <![endif]-->
  4.  
  5. <!--[if IE 5]>
  6. <link rel="stylesheet" href="css/ie5.css" type="text/css" />
  7. <![endif]-->
  8.  
  9. <!--[if IE 5.5]>
  10. <link rel="stylesheet" href="css/ie55.css" type="text/css" />
  11. <![endif]-->
  12.  
  13. <!--[if IE 6]>
  14. <link rel="stylesheet" href="css/ie6.css" type="text/css" />
  15. <![endif]-->
  16.  
  17. <!--[if IE 7]>
  18. <link rel="stylesheet" href="css/ie7.css" type="text/css" />
  19. <![endif]-->
  20.  
  21. <!--[if IE 8]>
  22. <link rel="stylesheet" href="css/ie8.css" type="text/css" />
  23. <![endif]-->
  24.  
  25. <!--[if lt IE 7]>
  26. <link rel="stylesheet" href="css/ie.css" type="text/css" />
  27. <![endif]-->
  28.  
  29. <!--[if lt IE8]>
  30. <link rel="stylesheet" href="css/ie.css" type="text/css" />
  31. <![endif]-->

以上是关于IE条件注释的主要内容,如果未能解决你的问题,请参考以下文章

IE条件注释

能用条件注释改善的IE兼容问题

使用条件注释定位 IE8 是不是有效?

ie模式 360兼容模式的兼容性调节以及控制代码

IE10 条件 IE 注释 <!--> 功能启用器

IE 修复 - 条件注释脚本不会执行