我有一个 div
,在FF中它可以在鼠标悬停时淡入淡出,但在IE7中,它只会隐藏和显示,没有任何动画效果。这是我的代码:
#nav-buttons {
display:none;
width:894px;
position:relative;
z-index:1000;
}
#left-button, #right-button {
position:absolute;
width:46px;
height:76px;
}
#left-button {
background:url("images/arrows.png") no-repeat scroll -88px -60px transparent;
left:-46px;
}
#left-button:hover {
background-position:-88px -260px;
}
#right-button {
background:url("images/arrows.png") no-repeat scroll 3px -60px transparent;
right:-43px;
}
#right-button:hover {
background-position:4px -260px;
}
----------
<div id="contents">
<div id="nav-buttons">
<a href="javascript:void(0)" id="left-button"></a>
<a href="javascript:void(0)" id="right-button"></a>
</div>
other html....
</div>
----------
$(document).ready(function() {
$("#contents").hover(function() {
$("#nav-buttons").fadeToggle("slow");
});
});