JSFiddle - React, Tailwind, and code Playground
by Mohamed Mulla
HTML
<div id="div">
<img src="http://www.contrastrebellion.com/public/images/logo-bg.png" width="290" height="290" style="-webkit-transform: rotate(0deg); " />
<img src="http://t3.gstatic.com/images?q=tbn:ANd9GcSVQXKCc1zsjS0Tm8YfHB2Mgv18FvDyci93Ksafsw-_2Vai9ZO6" width="290" height="290" style="-webkit-transform: rotate(0deg); " />
</div>
CSS
#div {
height:1600px;
overflow:auto;
width:350px;
}
#div img {
margin-top:400px;
}
JavaScript
var sdegree = 0;
$(window).scroll(function() {
sdegree ++ ;
sdegree = sdegree + 2 ;
var srotate = "rotate(" + sdegree + "deg)";
$("img").css({"-moz-transform" : srotate, "-webkit-transform" : srotate});
});