JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<div class="box" style="z-index:10000;margin-left: 70px;margin-top: 200px;"></div>
CSS
.box{
transform-origin : center left;
background-image:url("Wheelizate Tabs - Apart left_files/tick.png");
background:#000;
width: 200px;
height: 30px;
position: absolute;
left: 200px;
}
JavaScript
var box=$(".box");
var boxCenter=[box.offset().left+box.width()/2, box.offset().top+box.height()/2];
$(document).mousemove(function(e){
var angle = Math.atan2(e.pageX- boxCenter[0],- (e.pageY- boxCenter[1]) )*(180/Math.PI);
box.css({ "-webkit-transform": 'rotate(' + angle + 'deg)'});
box.css({ '-moz-transform': 'rotate(' + angle + 'deg)'});
box.css({ 'transform': 'rotate(' + angle + 'deg)'});
});