开发者

css ie hover "jumps"

开发者 https://www.devze.com 2023-02-15 16:14 出处:网络
I have an icon menu looks like: HTML: <td class=\"icon\"><a href=\"#\"><img src=\"icon.png\" /><br/>belowIconText</a></td>

I have an icon menu looks like:

HTML:

<td class="icon"><a href="#"><img src="icon.png" /><br/>belowIconText</a></td>

CSS:

.icon { background: none; }
.iconHover{ ba开发者_StackOverflowckground: url(images/icon.png); }

jQuery:

$(".icon").mouseover(function(){ $(this).addClass("iconHover"); });
$(".icon").mouseout(function(){ $(this).removeClass("iconHover"); });

Only in IE I have a background "jump". By "jump" I dont mean position issue, but I mean that in the <td> tag I have a properly working background switch, and on leaving <td> and entering <img> inside it I see how IE hides the background (detects .icon mouseout) and then show it again (detects .icon mouseover). Is there any way to fix that?

Thanks in advance!

0

精彩评论

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