JSFiddle - React, Tailwind, and code Playground
HTML
click it to fade.
<div id="top"> </div>
<div id="bottom"> </div>
CSS
#top, #bottom {
position: absolute;
top: 2.5em;
left: 20px;
height: 400px;
width: 400px;
padding: 10px;
font-weight: bold;
}
#top { z-index: 100;
background: gray;
cursor: pointer
}
#bottom {
z-index: 50;
background: red;
color: #fff;
}
JavaScript
$(function(){
$('#top').click(function(){
$(this).fadeOut(1000);
});
});