JSFiddle - React, Tailwind, and code Playground
by peduarte
HTML
<button id="change">» Run</button><br><br>
<div class="block">TEST</div>
CSS
.block{
-moz-transition:All 1s ease;
-moz-transform: rotate(1deg);
width:200px; height:100px;
background-color:#999;
}
.block:hover{
-moz-transform: rotate(40deg);
-webkit-transform: rotate(40deg);
}
.on {
-moz-transform: rotate(80deg);
-webkit-transform: rotate(80deg);
}
JavaScript
$(function(){
$('#change').click(function(){
$(this).toggleClass('on');
});
});