开发者

HTML Comments to detect IE6 and IE7

开发者 https://www.devze.com 2022-12-19 19:34 出处:网络
<!--[if IE 6]> 开发者_如何学CI am using IE6 <![endif]--> That works. How do I do \"or\" IE7?If you, for whatever reason, what to only test for IE6 or IE7, and maybe have some other cond
<!--[if IE 6]>
开发者_如何学CI am using IE6
<![endif]-->

That works.

How do I do "or" IE7?


If you, for whatever reason, what to only test for IE6 or IE7, and maybe have some other conditions for IE5 elsewhere, there is also support for other operators:

  <!--[if (IE 6)|(IE 7)]>
    This is IE 6 or IE 7!
  <![endif]-->

Check out the wikipedia article which has better documentation than Quirksmode on this.


you can do

<!--[if lte IE 7]>
I am using IE less than or equal to version 7
<![endif]-->

Have a look at http://www.quirksmode.org/css/condcom.html#link3 for detailed options..


same exact format. just change the ie version. Refer to here. http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消