开发者

jQuery animate background position in chunks?

I'm trying to use jQuery to make a background position of my span go down 10 pixels every second. What is a good way to do this?

I've been playing with jQuery animate, delay, CSS, and some setTimeout functions but I can't get anything to work. Sugge开发者_如何学编程stions greatly appriciated!

I'm trying to make my y-position go from 0 to 100 in increments of 10 pixels, and then stop the animation.


jQuery can't animate background position properly because of the need to animate two values instead of just one. Explanation and solution here:

http://snook.ca/archives/javascript/jquery-bg-image-animations/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜