Animation move from right to left

-1

I have this little animation in javascript, which makes my background move though, this has times that moves from right to left and has other times that moves from left to right.

How would you always move from right to left.

Code:

        $('#cores').animate({
 'background-position-x': cd.position
},{ duration: 6000, 'easing':'easeOutCubic'

Thank you.

    
asked by anonymous 18.04.2016 / 03:47

1 answer

0

Try to set two sides, left and right as a variable. Then try to make the background follow this variable according to the speed and effect you want ..

If it's what I understand, you can follow this logic

Take a look at this site: All Animation , I think there must have the effect you want! I think you can have a good idea.

Good luck!

    
18.04.2016 / 14:05