JSFiddle - React, Tailwind, and code Playground
by acccco
HTML
<div class="box1">
<div class="box2">
<div class="box3"></div>
</div>
</div>
CSS
.box1 {
width: 300px;
height: 300px;
position: relative;
perspective: 300px;
}
.box2 {
width: 100px;
height: 100px;
position: absolute;
top: 100px;
left: 100px;
background: red;
}
.box3 {
width: 100px;
height: 100px;
background: blue;
transform: rotateY(45deg);
}