HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> #point{ box-sizing: border-box; height: 280px; width: 280px; background: url("/husky.jpg") no-repeat; border: 10px double #8c8c8c; background-clip: border-box; padding: 10px; } </style> </head> <body> <h1>CSS background-clip Property</h1> <div id="point"> </div> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementById("point"); function myFunction(){ x.style.backgroundClip = "padding-box"; } </script> <p><strong>Note</strong>: Click on the button to change the 'background-origin' from border-box to padding-box.</p> </body> </html>
OUTPUT
×

Save as Private