Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> #myDIV { border: 1px solid black; width: 300px; height: 150px; padding: 35px; background: url('smiley.gif') no-repeat; } </style> </head> <body> <p>Click the "Try it" button to set the background-origin property of the DIV element to "content-box":</p> <button onclick="myFunction()">Try it</button> <div id="myDIV"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. </div> <script> function myFunction() { document.getElementById("myDIV").style.backgroundOrigin = "content-box"; } </script> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss3_js_background-origin by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:50:16 GMT --> </html>
Result:
Try it Yourself - © w3schools.com