<div class="container">
<img class="demo center" src="https://images.unsplash.com/photo-1709842665072-6404e47a5386?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw1fHx8ZW58MHx8fHx8" />
</div>
.container {
width: 100vw;
height: 100vh;
}
.center {
display: block;
margin: auto;
}
.demo {
height: 333px;
width: 500px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.