JSFiddle - React, Tailwind, and code Playground
by qunzorez
HTML
<div class="box">
<div></div>
</div>
CSS
.box {
position:fixed;
margin:auto;
top:0;
left:0;
right:0;
bottom:0;
width:75px;
height:64.5px;
transition:0.5s all 0.5s;
transform-origin: 50% 63%;
}
.box::before,
.box::after,
.box div:before,
.box div:after{
content:"";
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
border-radius:8px;
transform-origin:bottom;
transition:0.5s all;
}
.box::before {
background:#5840bc;
transform:skewX(-30deg);
border-bottom-right-radius: 0;
box-shadow:
0px -20px #886df8,
0px -40px #c2b3f8;
}
.box::after {
background:#5844d9;
box-shadow:
-20px 0 #7d69ca,
-40px 0 #c7bee9;
transform:skewX(30deg);
border-top-right-radius: 0;
}
.box div:before {
background: #714ffe;
box-shadow:
0px -20px #7c6ade,
0px -40px #c7bee9;
transform: translate(0%,50%)rotate(120deg) skewX(-30deg);
transform-origin: center;
border-bottom-right-radius: 0;
}
.box div:after {
background: #fff;
z-index: 1;
clip-path: polygon(50% 0,100% 100%,0 100%);
border-radius:0;
}
html:hover .box{
transform:rotate(60deg);
}
html:hover .box::before,
html:hover .box::after,
html:hover .box div:before,
html:hover .box div:after{
box-shadow:
0px 0 transparent,
0px 0 transparent;
}