JSFiddle - React, Tailwind, and code Playground
by apasaja
HTML
<div id="circle-orbit-container">
<!-- Circles closest to the central point -->
<div id="inner-orbit">
<div class="inner-orbit-cirlces"></div>
</div>
</div>
CSS
/* ---------- Container for the orbiting circles animation ---------- */
/* #circle-orbit-container {
position: relative;
top: 25px;
left: 25px;
height: 300px;
width: 300px;
} */
/* ---------- Inner orbit - This is the circles closest to the central point ---------- */
#inner-orbit {
position: absolute;
top: 75px;
left: 75px;
width: 150px;
height: 150px;
border: 2px #4A437F dashed;
border-radius: 100%;
-webkit-animation: spin-right 10s linear infinite;
animation: spin-right 10s linear infinite;
}
/* ---------- Repeating styles for the inner orbiting circles ---------- */
.inner-orbit-cirlces {
position: absolute;
top: 62px;
left: -6px;
height: 10px;
width: 10px;
border-radius: 100%;
background-color: #9F98E6;
}
/* ---------- Animation ---------- */
@-webkit-keyframes spin-right {
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}