JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div id="active"></div>
<div id="passive"></div>
<div id="environment"></div>
</div>
CSS
div, body {
margin: 0;
padding: 0;
background: #bbb;
}
div {
position: absolute;
width: 300px;
height: 300px;
}
div.wrapper {
top: 200px;
left: 150px;
}
div#active {
background: #555;
transform: rotate3d(-1, 0, 0, 45deg) rotate3d(0, 0, 1, 45deg);
margin-top: -150px;
}
div#passive {
background: #333;
transform: rotate3d(-1, 0, 0, 45deg) rotate3d(0, 1, 0, 45deg);
margin-left: 106px;
margin-top: 31px;
}
div#environment {
background: #222;
transform: rotate3d(1, 0, 0, 45deg) rotate3d(0, 1, 0, 45deg);
margin-top: 31px;
margin-left: -106px;
}