JSFiddle - React, Tailwind, and code Playground
HTML
<DIV id="rect" style="position:relative;top:0px;left:0px;width:100px;height:200px;border:1px solid #000000;">Some content</DIV>
<DIV id="posout"></DIV>
JavaScript
var div = document.getElementById('rect');
var posout = document.getElementById('posout');
posout.innerHTML = 'top:' + div.style.top + '</br>left:' + div.style.left;
div.onclick = function () {
div.style.webkitTransform = 'rotate(90deg)';
div.style.mozTransform = 'rotate(90deg)';
div.style.msTransform = 'rotate(90deg)';
div.style.oTransform = 'rotate(90deg)';
div.style.transform = 'rotate(90deg)';
}