JSFiddle - React, Tailwind, and code Playground
HTML
<div id="elm">
test
</div>
<div id="menu">
menu
</div>
CSS
#elm {
width: 20px;
height: 20px;
background-color: blue;
margin-bottom: 20px;
}
#menu {
width: 20px;
height: 20px;
background-color: hotpink;
display: none;
opacity: 0;
transition: opacity 1s linear;
}
JavaScript
var elm = document.getElementById('elm');
var menu = document.getElementById('menu');
elm.onmouseover = function () {
menu.style.display = 'inline-block';
setTimeout(function () {
menu.style.opacity = 1;
}, 1);
}