JSFiddle - React, Tailwind, and code Playground
HTML
<div id="message">:)</div><a id="showmessage" href="#">Show smiley</a>
CSS
#message {
opacity:0.7;
-webkit-border-radius:5px;
background-color:black;
color:white;
width:200px;
position: absolute;
left: 50%;
margin-left: -100px;
top: 50%;
margin-top: -150px;
text-align: center;
font-size: 200pt;
display: none;
padding-bottom:40px;
}
JavaScript
$("#showmessage").click(function() {
$("#message").show().delay(1000).fadeOut();
});