JSFiddle - React, Tailwind, and code Playground

HTML

<div id='myDiv'></div>

CSS

div {
   width:100px;
   height:100px; 
   background-color: red;
   text-indent: 180px
}

JavaScript

$('#myDiv').animate({  textIndent: 0 }, {
    step: function(go) {
      $(this).css('-moz-transform','rotateY('+go+'deg)');
      $(this).css('-webkit-transform','rotateY('+go+'deg)');
      $(this).css('-o-transform','rotateY('+go+'deg)');
      $(this).css('transform','rotateY('+go+'deg)');
    },
    duration: 1000,
    complete: function(){ alert('done') }
});