<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
div {
width: 100%;
height: 400px;
background-image: url('img_flowers.jpg');
background-repeat: no-repeat;
background-size: contain;
border: 1px solid red;
}
</style>
</head>
<body>
<p>Resize the browser window to see the effect.</p>
<div></div>
</body>
<!-- Mirrored from www.w3schools.com/css/tryit.asp?filename=tryresponsive_image_background1 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 16:50:19 GMT -->
</html>