开发者

Tween on background position doesn't work

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜