开发者

Is it possible to target IE8's compatibility view in CSS?

Is this po开发者_Python百科ssible? I'd of assume that compatibility view is much like the older IE's, so I tried

<!--[if lt IE 8]>
 css goes here
<![endif]-->

but it doesn't work.


That says: "if IE version is lower then to 8. Try:

<!--[if lte IE 8]>
 css goes here
<![endif]-->


A valuable resource for dealing with IE8, doctypes, and standards vs. quirks mode is found in Activating Browser Modes with Doctype. Make note of the X-UA-Compatible header/meta tag. Also note that your if is targeting anything less than "lt" IE 8, which means you'll never trigger your CSS in IE 8.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜