用jquery延迟背景效果?
我试图更改一些div悬停时的背景,但由于某些原因,我无法使用jquery。 我想要的是提供一个从图像到悬停图像的效果,因为使用css的变化太快,看起来一点也不好。 有什么建议吗? 这是我的密码用jquery延迟背景效果?,jquery,Jquery,我试图更改一些div悬停时的背景,但由于某些原因,我无法使用jquery。 我想要的是提供一个从图像到悬停图像的效果,因为使用css的变化太快,看起来一点也不好。 有什么建议吗? 这是我的密码 #siman{ background: url(images/siman.png) left top no-repeat; } #vogue{ background: url(images/vogue.png) top left no-repeat; } #consejo{ bac
#siman{
background: url(images/siman.png) left top no-repeat;
}
#vogue{
background: url(images/vogue.png) top left no-repeat;
}
#consejo{
background: url(images/consejodelcafe.png) top left no-repeat;
}
#digicel{
background: url(images/digicel.png) top left no-repeat;
}
#siman:hover, #vogue:hover, #consejo:hover, #digicel:hover{
background-position: left -96px
}
你不能使用动画功能吗 您在图像上附加了一个悬停侦听器,在悬停时,您的函数会执行此操作
$(this).css('background-position', '0px 0px');
$(this).animate({
'background-position-x': '-96px',
}, 10000, 'linear');
这就是你要找的吗?所以,我的代码应该是这样的:$siman.hover函数{$this.animate{'background-position-x':'-96px',},10000,'linear';};对不起,我对jquery太陌生了!