HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> body{ background-image: url("orange.png"); } </style> </head> <body> <h1>CSS background-repeat Property</h1> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementsByTagName("body")[0]; function myFunction(){ x.style.backgroundRepeat = "no-repeat"; } </script> <p><strong>Note</strong>: Click on the button to set background-repeat to 'no-repeat'</p> </body> </html>
OUTPUT
×

Save as Private