Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <style> div { background-image: url('img_tree.png'); background-repeat: no-repeat; width: 400px; height: 400px; border: 1px solid #000000; } </style> <script> function displayResult() { document.getElementById("div1").style.backgroundPosition="center bottom"; } </script> </head> <body> <button type="button" onclick="displayResult()">Position background image</button> <br> <div id="div1"> </div> </body> </html>
Result:
W3Schools.com - Try it yourself