【发布时间】:2013-06-08 20:20:41
【问题描述】:
我知道要针对 IE8+,您应该使用:
<!--[if gte IE 8]>
According to the conditional comment this is IE 8 or higher<br />
<![endif]-->
对于非 IE 浏览器,您可以使用:
<!--[if !IE]> -->
According to the conditional comment this is not IE<br />
<!-- <![endif]-->
你也可以像这样组合条件:
[if (IE 6)|(IE 7)]
但我的问题是,现在我想定位 IE8+ 或非 IE 浏览器,我尝试像这样定位它们:
<!--[if (!IE)|(gte IE 8)]> -->
This should be non IE or IE8+ browsers
<!-- <![endif]-->
这似乎适用于非 ie 浏览器,但在 IE 中添加 -->。
我猜这与 cmets 下层显示和下层隐藏的类型有关,但我不确定如何处理它们。
【问题讨论】:
标签: html internet-explorer browser comments conditional