Change the position of a background-image:
document.body.style.backgroundPosition = "top right";
<!DOCTYPE html> <html> <head> <style> body {/*from w w w . jav a 2 s . co m*/ background-image: url('image1.png'); background-repeat: no-repeat; } </style> </head> <body> <button type="button" onclick="myFunction()">Position background image</button> <script> function myFunction() { document.body.style.backgroundPosition="top right"; } </script> </body> </html>