JSFiddle - React, Tailwind, and code Playground

HTML

<div id="square"></div>

CSS

@-webkit-keyframes rotate {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}

#square {
    background-color: #369;
    height: 100px;
    margin: 50px;
    width: 100px;
    -webkit-transform: rotate(0deg);
}

#square:hover {
    -webkit-animation: rotate 5s linear infinite;
}