Change/increment the background position using JQuery dynamically
- Background position is one of the style in the background style group.
- As the name defines this background position is to position the background image.
We may come across some situations where we need to move the background as in the games, or in the parallax effect. The main line to work as moving background
Suppose u need the clouds moving as the background, just use this code and that works fine.
$("div").animate({"background-position":"+=20%"});
use this statement repeatedly using some looping technique. you will see the clouds moving at background...
Excellent information. It is very helpful for me, Thanks for sharing.
ReplyDeleteAngular JS Training
Angular JS Training In Hyderabad
Angular JS Online Training