JSFiddle - React, Tailwind, and code Playground

by Arman Bari

HTML

<div style="position:relative; width:500px; height:250px; overflow:scroll">
<div id="RotationDiv" style="width:100%; height:100%; position: absolute; z-index: 1;">
            <img src="http://doc.jsfiddle.net/_downloads/jsfiddle-logo.png" width="450px" height="200px" />
        </div>
    </div>

JavaScript

document.getElementById('RotationDiv').style.msTransform = 'rotate(' + '90' + 'deg)';
        document.getElementById('RotationDiv').style.webkitTransform = 'rotate(' + '90' + 'deg)';

        $('#RotationDiv').css('-webkit-transform-origin', 900 / 2 + 'px ' + 450 / 2 + 'px');
        $('#RotationDiv').css('-ms-transform-origin', 900 / 2 + 'px ' + 450 / 2 + 'px');

       /* $('#RotationDiv').css('top','-'+ 450 / 2 + 'px');
        $('#RotationDiv').css('left', 0 + 'px');

        $('#RotationDiv').height(900);
        $('#RotationDiv').width(450);*/