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-size: cover; border: 1px solid #999; } </style> </head> <body> <h2>Resized and Responsive Background Image</h2> <p>Resize the browser to see the effect:</p> <div class="resized"></div> </body> </html>