I am now centering the background (using background-position: 50% 50%; ), which I would like to animate with Javascript. But, I want to be able to animate this using pixel measurements. In fact, I want to set the background position to something like "50% + 10px". Is it possible to use Javascript?
I can do this by finding the height of the background image and the height of the browser screen and doing some arithmetic, but this seems like a confusing solution.
source share