Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Der Titel des Dokuments</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> div.img-block { width: 100%; height: 450px; background-image: url("/uploads/media/default/0001/01/25acddb3da54207bc6beb5838f65f022feaa81d7.jpeg"); background-size: cover; border: 1px solid red; } h2 { padding: 0 10px; color: #fff; } </style> </head> <body> <p>Ändern Sie die Größe des Browserfensters, um den Effekt zu sehen.</p> <div class="img-block"> <h2> Ihr Hintergrundbild</h2> </div> </body> </html>