JSFiddle - React, Tailwind, and code Playground

by avaly

HTML

<div id="app">
    <h1>Foo bar</h1>
    <button>Test</button>
</div>

CSS

body {
    background: #eee;
    perspective: 600px;
/*    perspective-origin: 100% 0%;*/
}
#app {
    background: #ccf;
    min-height: 400px;
    transform: none;
    transform-origin: 0 0;
    transition: all 1s linear;
}
#app.foo {
    transform: rotateY(-80deg);
}

JavaScript

$('button').click(function(){
    $('#app').toggleClass('foo');
});