JSFiddle - React, Tailwind, and code Playground
HTML
<div class="a">afsdf</div>
CSS
.a {
background-color: red;
height: 200px;
width: 200px;
}
.rotated {
opacity: .5;
transform: rotateX(180deg)
}
JavaScript
var source = document.querySelector('.a')
var mirror = source.cloneNode(true)
mirror.classList.add('rotated')
document.body.appendChild(mirror)