JSFiddle - React, Tailwind, and code Playground
HTML
<div class="circle"></div>
CSS
.circle{
width:300px;
height:300px;
border-radius:9999px;
background-color:red;
background-image:url(http://lorempixel.com/300/300/cats/);
background-position:center;
background-size:cover;
transition:1s;
transition-timing-function: ease-in-out;
}
JavaScript
var lastRotate = 0;
document.getElementsByClassName('circle')[0].addEventListener('click',function(e){
e.target.style.transform = 'rotate('+(lastRotate +=Math.random()*Math.PI*10)+'rad)';
return false;
})