Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>The title of the document</title> <style> .example { background-image: url("/uploads/media/default/0001/01/4982c4f43023330a662b9baed5a407e391ae6161.jpeg"); min-height: 500px; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; } </style> </head> <body> <h2>Background-attachment example</h2> <p> Scroll the page to see the effect. </p> <div class="example"></div> <div style="height:800px;background-color:#1c87c9;"></div> </body> </html>