谁能帮我解决为什么这在 IE 中不起作用? 我有一张产品照片,当翻过它时,它会向下移动以释放其下方的更多信息。 这适用于所有其他浏览器,但不适用于 IE < 7 有什么想法或其他解决方案吗?
目前悬停效果正常工作,但“滚动”在 IE 中没有任何作用 谢谢
$('#topProducts li').hover(
function () {
$(this).find('.topProdImg').stop().animate({
bottom: '-=140'
}, 500)
}, function () {
$(this).find('.topProdImg').stop().animate({
bottom: '+=0'
}, 500)
});
CSS:
.topProducts ul li img{
position:absolute;
z-index:10;
padding-bottom:10px;
border-bottom:1px #ebebeb solid;
left: 20px;
}
谢谢
最佳答案
尝试使用px
$('#topProducts li').hover(
function () {
$(this).find('.topProdImg').stop().animate({
bottom: '-=140px'
}, 500)
}, function () {
$(this).find('.topProdImg').stop().animate({
bottom: '0px' //it doesn't sense to apply +=0
}, 500)
});
关于在 IE 中使用 '+=' 动画的 Jquery 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21299115/