JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
CSS
div {
margin: 20px;
width: 100px;
height: 100px;
background: #f00;
animation-name: spin;
animation-duration: 4000ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}