JSFiddle - React, Tailwind, and code Playground
by ZachWills
HTML
<div class="ball">
<div class="little-ball"></div>
<div class="little-ball"></div>
<div class="little-ball"></div>
<div class="little-ball"></div>
</div>
CSS
.ball {
transition:all .6s ease-in-out;
border:2px dashed black;
position:relative;
border-radius:100%;
background:red;
height:50px;
width:50px;
margin-top:50%;
margin-left:50%;
-webkit-transform:rotate(1deg);
}
.little-ball {
transition:all .3s ease-in-out;
border-radius:100%;
position:absolute;
width:25px;
height:25px;
top:12.5px;
left:12.5px;
background:black;
position:absolute;
}
.ball:hover {
-webkit-transform:rotate(359deg);
}
.ball:hover .little-ball:nth-child(1) {
transition-delay: 0s;
top:-50px;
left:12.5px;
}
.ball:hover .little-ball:nth-child(2) {
transition-delay: .1s;
top:12.5px;
left:75px;
}
.ball:hover .little-ball:nth-child(3) {
transition-delay: .2s;
top:75px;
left:12.5px;
}
.ball:hover .little-ball:nth-child(4) {
transition-delay: .3s;
top:12.5px;
left:-50px;
}