JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ricostacruz.com/jquery.transit/jquery.transit.min.js"></script>
<div></div><button>Claick me</button>
CSS
div {
width:160px;
height:160px;
left:50%;
top:50%;
position:absolute;
margin:-80px 0 0 -80px;
background: url('http://chandra.harvard.edu/photo/2012/igrj11014/igrj11014.jpg');
background-size:cover;
}
JavaScript
$('button').on('click',function(){
$('div').transition({
rotate:'+=60deg',
rotateX: '+=30deg',
rotateY: '+=80deg'
})
});