0
你如何使用条件注释目标有效条件注释针对非IE浏览器和IE特定版本
Internet Explorer中仅
某些版本的IE
某些版本的IE和所有其他浏览器
没有IE浏览器,只是其他浏览器
以某种方式验证? (validator.w3.org/)
你如何使用条件注释目标有效条件注释针对非IE浏览器和IE特定版本
Internet Explorer中仅
某些版本的IE
某些版本的IE和所有其他浏览器
没有IE浏览器,只是其他浏览器
以某种方式验证? (validator.w3.org/)
我测试了这些,他们是有效的HTML。
重要:Only IE 5 through 9 support conditional comments.
<!-- 1. IE 5-9 only: -->
<!--<![if IE]>
<link rel="stylesheet" type="text/css" href="ie-5-through-9.css">
<![endif]>-->
<!-- 2. Some IE versions -->
<!--<![if gte IE 8]>
<link rel="stylesheet" type="text/css" href="ie-8-and-9.css">
<![endif]>-->
<!-- 3. Some IE versions, plus all non-IE browsers -->
<!--[if gte IE 8]>-->
<link rel="stylesheet" type="text/css" href="ie-gte8-and-non-ie.css">
<!--<![endif]-->
<!-- 4. All browsers except IE 5-9 -->
<!--[if !IE]>-->
<link rel="stylesheet" type="text/css" href="modern-ie-and-non-ie.css">
<!--<![endif]-->