JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wheel"></div>
CSS
#wheel {
position: absolute;
left: 50%;
top: 50%;
margin-left: -100px;
margin-top: -100px;
width: 200px;
height: 200px;
background: red;
border-radius: 200px;
-webkit-transition-property: -webkit-transform;
-webkit-transition-duration: 2s;
-webkit-transform: rotate(163deg);
}
JavaScript
$(function() {
var rotation = 163;
$('body').on('click', function() {
rotation = (rotation == 163) ? 198 : 163;
$("#wheel").css('-webkit-transform', "rotate(" + rotation + "deg)");
});
});