开发者

Tween on background position doesn't work

开发者 https://www.devze.com 2023-02-21 10:19 出处:网络
anyone can explain me开发者_JAVA技巧 why $(\'\'+this.get(\"rel\")+\'-arrow\').tween(\"margin-top\",-10);

anyone can explain me开发者_JAVA技巧 why

$(''+this.get("rel")+'-arrow').tween("margin-top",-10);

work and

$(''+this.get("rel")+'-arrow').tween("background-position","center -10px");

doesn't work? thanks a lot :)


All animation methods animate values that are numerical, center is not, and actually, you shouldn't be using center, it's 50%.

Example: http://jsfiddle.net/bejD4/

document.getElement('div').tween('background-position', '50% 100px');
0

精彩评论

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