开发者

How to target IE=EmulateIE7 for IE8 only?

Now that IE9 has come out, I noticed that the IE=Emulate开发者_Python百科IE7 trick also affects it. How can I make it target IE8 only??

So far I tried conditional comments

<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
 <![endif]-->

But for some reason it does not work (maybe conditional comments dont work with meta tags?). Anyone have any idea?


Use the dual mode:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=EmulateIE9">

as mentioned here: Emulate IE7 for IE8 but not for IE9 using "X-UA-Compatible"


I've read that using a semi-colon as the separator doesn't work, and that you should use commas instead, i.e:

content="IE=EmulateIE7, IE=EmulateIE9"

and NOT:

content="IE=EmulateIE7; IE=EmulateIE9"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜