简体   繁体   English

IE条件注释“和”?

[英]IE conditional comments 'and'?

Is it possible to insert an 'and' in a conditional comment? 是否可以在条件注释中插入“和”?

For example: 例如:

<!--[if gte IE 9 && if !IE]>
// MESSAGE
<![endif]-->

Triggering only IE 9, higher versions of IE and browsers that are not IE? 仅触发IE 9,更高版本的IE和非IE浏览器?

The & operator is not even necessary. &运算符甚至不是必需的。 This code will run in non-IE browsers and in IE 9 and higher, according to the syntax description on Wikipedia: 根据Wikipedia上的语法说明 ,此代码将在非IE浏览器以及IE 9及更高版本中运行:

<!--[if gt IE 9]><!-->
// MESSAGE
<!--<![endif]-->

Conditional comments are an IE on thing. 条件注释是关于事物的IE。

Check out this post and answer for details on how to do what you want. 查看这篇文章,并回答有关如何做自己想做的详细信息。

IE Conditional Comments and Chrome/Firefox IE条件注释和Chrome / Firefox

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM