JSFiddle - React, Tailwind, and code Playground
HTML
<div class="spinning">
some content
</div>
CSS
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
}
.spinning::before {
content: 'x';
animation: spin 2s infinite linear;
}