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');
精彩评论