jQuery动画背景位置 [英] jquery animate background position
本文介绍了jQuery动画背景位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我似乎无法正常工作.
$('#product_family_options_dd').animate({
height: '300px',
width: '900px',
backgroundPosition: '-20px 0px',
},
高度和宽度会动画,但背景不会动画.
The height and width animate but not the background.
推荐答案
如果仅使用像这样的单独值,则无需使用背景动画插件:
You don't need to use the background animate plugin if you just use separate values like this:
$('.pop').animate({
'background-position-x': '10%',
'background-position-y': '20%'
}, 10000, 'linear');
这篇关于jQuery动画背景位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文