JSFiddle - React, Tailwind, and code Playground
HTML
<div class="canvas">
<div class="side"></div>
</div>
CSS
.canvas {
width:250px;
height:250px;
background-color:black;
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
-webkit-perspective: 500px;
perspective: 500px;
}
.side {
background-color:blue;
width:150px;
height:150px;
-webkit-transform: rotateX(45deg);
transform: rotateX(45deg);
}