开发者

CSS - How to deactivate the :hover pseudo class in IE 6

I use a hover navigation and it all works well. I'm really satisfied. But I'm also sadistic to the IE6 - so is there a CSS way to deactivate the :hover pseudo class?

like

...
<!--[if IE 6]>
<style>
#topNavigation #top_right li.directlinks:hover ul {dont-let-me-do-that:true;}
</style>
<![endif]-->
</head>
<bod....>

But I think there is not such a function.. so maybe a JQuery snippet? Well I count on you guys!

Edit: Here my actual code - and yes ... it does work on a li. I CAN hover it in IE6 (but its a bit buggy so I开发者_JAVA技巧 will disable this function and I work with a JQUERY hover(function()...)

#topNavigation #top_right li.directlinks:hover ul {display:block}


IE6 doesn't support :hover on anything but a elements anyway, so it's got you covered there.

That said, if you'd like to hide any rules from IE6, it's just a matter of tossing in the child combinator somewhere in the selector, here's the famous html > body hack:

html > body #topNavigation #top_right li.directlinks:hover ul

But I seriously doubt your selector works on anything but a patched IE6 MSHTML.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜