JSFiddle - React, Tailwind, and code Playground

by khamer

HTML

<div class="foo">foo</div>
<div class="bar"></div>

CSS

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.foo,
.bar {
    display: inline-block;
}

.foo {
    animation: spin 1s linear infinite;
}

.bar:before {
    content: 'bar';
    animation: spin 1s linear infinite;
    display: inline-block;
}