Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <style> body { background: #f3f3f3 url('img_tree.png'); } </style> <body> <h1>HTML Style Object</h1> <h2>The backgroundRepeat Property</h2> <button type="button" onclick="myFunction()">Set background image to no-repeat</button> <script> function myFunction() { document.body.style.backgroundRepeat = "no-repeat"; } </script> </body> </html>