Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Resized and Responsive Background Image</title> <style> .resized { width: 100%; height: 400px; background-image: url("/uploads/media/default/0001/01/b408569013c0bb32b2afb0f0d45e93e982347951.jpeg"); background-repeat: no-repeat; background-size: contain; border: 1px solid #999; } </style> </head> <body> <h2>Resized and Responsive Background Image</h2> <p>Ändern Sie die Größe des Browsers, um den Effekt zu sehen:</p> <div class="resized"></div> </body> </html>