JSFiddle - React, Tailwind, and code Playground
HTML
<div id="fleche">POUF !</div>
CSS
#fleche{
width:100px;
height:100px;
background-color: lightgreen;
border: 1px solid black;
}
.rotate{
transform-origin: 50% 50%;
transform: rotateY( 180deg );
-webkit-transform:rotate(180deg);
-moz-transform:rotate(180deg);
}
JavaScript
$("#fleche").click(function(){
$(this).addClass("rotate");
});