JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
CSS
div {
width: 9em;
padding: .6em 1em;
margin: 1em auto;
background: yellowgreen;
animation: spin 1s linear infinite;
-webkit-animation: spin 1s linear infinite;
animation-play-state: paused;
-webkit-animation-play-state: paused;
}
@keyframes spin {
to {
-webkit-transform: rotate(1turn);
}
}
@-webkit-keyframes spin {
to {
-webkit-transform: rotate(1turn);
}
}
div:hover {
animation-play-state: running;
-webkit-animation-play-state: running;
}