JSFiddle - React, Tailwind, and code Playground
HTML
<div class="outCircle">
<div class="spinner rotate"></div>
</div>
CSS
@-webkit-keyframes circle {
from {-webkit-transform: rotateZ(0deg) translateX(100px)}
to {-webkit-transform: rotateZ(-360deg) translateX(100px)}
}
.rotate {
background-color: green;
width: 100%;
height: 100%;
-webkit-animation: circle 10s infinite linear;
}
.spinner {
position: absolute;
margin: 50px;
width: 100px;
height: 100px;
background: red;
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
border-radius: 100px;
position: absolute;
left: 0px;
top: 0px;
background-color: red;
display: block;
}
.outCircle {
width: 200px;
height: 200px;
background-color: lightblue;
position:relative;
left: 270px;
top: 50px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
border-radius: 100px;
}