Jquery animation background position in pieces?

I am trying to use jQuery to make the background position of my range down 10 pixels per second. What is a good way to do this?

I played with jQuery animation, delay, CSS and some functions setTimeout, but I can't get anything to work. Suggestions were very helpful!

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

+3
source share
1 answer

jQuery cannot animate its original position properly due to the need to animate two values ​​instead of one. Explanation and solution here:

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

+2

Source: https://habr.com/ru/post/1735996/


All Articles