JSFiddle - React, Tailwind, and code Playground
by DanialQuinn
HTML
<div class="container">
<div class="second--image">
<div>
<div>
<div class="image">2</div>
</div>
</div>
</div>
<div class="first_third--image">
<div class="first--image image">1</div>
<div class="third--image">
<div class="image">3</div>
</div>
</div>
</div>
CSS
.container {
width: 400px;
position: relative;
}
.image {
width: 300px;
height: 300px;
background-color: #eee;
display: flex;
justify-content: center;
align-items: center;
font-size: 50px;
font-weight: 300;
}
.second--image,
.first--image,
.third--image {
position: absolute;
}
.first_third--image {
position: relative;
}
.first--image.image {
z-index: 1;
}
.second--image {
z-index: 2;
}
.third--image {
z-index: 3;
}