Relative position property css
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="container">
<img class="image1" src="https://assets.onecompiler.app/4355eh3uc/4355ev2m4/images%20(2).jpeg" alt="img2">
<img class="image2" src="https://assets.onecompiler.app/4355eh3uc/4355ev2m4/images.jpeg" alt="img2">
<img class="image3" src="https://assets.onecompiler.app/4355eh3uc/4355ev2m4/images%20(1).jpeg" alt="img3">
<img class="image4" src="https://assets.onecompiler.app/4355eh3uc/4355ev2m4/images%20(4).jpeg" alt="img4">
</div>
</body>
</html>
.image1{
width:200px;
height: 200px;
position: relative;
top:10px;
}
.image2{
width:200px;
height: 200px;
position: relative;
top:20px;
left : 30px;
}
.image3{
width:200px;
height: 200px;
position: relative;
top:30px;
left:40px;
}
.image4{
width:200px;
height: 200px;
position: relative;
top: 40px;
left:50px;
}
.container{
border: 2px solid black;
}