Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>The title of the document</title> <style> .example1 { border: 5px dashed #666; padding: 35px; background: url("/uploads/media/default/0001/01/25acddb3da54207bc6beb5838f65f022feaa81d7.jpeg"); background-repeat: no-repeat; background-origin: padding-box; } </style> </head> <body> <h2>Background-origin property example</h2> <p>Here the background-origin is set to "border-box".</p> <div class="example1"> <h2>Hello world.</h2> <p> Some text for example.</p> </div> </body> </html>