Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> #myDIV { height:200px; border: 10px dashed black; padding: 25px; background-attachment: fixed; background-position: center; background-image: url("img_tree.gif"); } </style> </head> <body> <h1>The background-position Property</h1> <div id="myDIV"> This demo shows how to specify where the background image should be positioned. </div> </body> </html>