JSFiddle - React, Tailwind, and code Playground
HTML
<div class="description-box">dasdasdasdsd</div>
<div class="image">
<img alt="" class="icon" src="work/Maru/img/maru-3.jpg">
</div>
<br>
CSS
.description-box {
margin: auto;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index:10;
width:40%;
height:40%;
background-color:#e8e8e8;
}
.image img {
position:absolute;
width:100%;
height:100%;
background-color: #828282;
}
JavaScript
$(".description-box").on({
mouseover: function () {
timer = setTimeout(function () {
$(".image img").fadeOut();
}, 100);
},
mouseout: function () {
clearTimeout(timer);
$(".image img").fadeIn();
}
});