JSFiddle - React, Tailwind, and code Playground
HTML
<div>ABCD</div>
CSS
body {
-webkit-transform:rotate(90deg);
}
div {
-webkit-transform:rotate(270deg);
}
JavaScript
$(document).ready(function(){
$(window).bind("resize", function(){
var orientation = window.orientation;
var new_orientation = (orientation) ? 0 : 180 + orientation;
$('body').css({
"-webkit-transform": "rotate(" + new_orientation + "deg)"
});
});
});