JSFiddle - React, Tailwind, and code Playground
by seevis
HTML
<div class="berel">
<img src="https://2img.net/image.noelshack.com/fichiers/2019/27/7/1562499942-keanu1.png" class="imgberel">
<div class="oerel"><img src="https://i.imgur.com/OquNZnq.gif" class="imgberel">
</div>
</div>
CSS
.berel {
position: relative;
width: 150px;
border: 4px solid teal;
}
.imgberel {
display: block;
width: 150px;
height: auto;
}
.oerel {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
overflow-y: auto;
background-color: #242b2e;
transition: 0.5s ease;
}
.berel:hover .oerel {
opacity: 0.9;
}
.txtberel {
position: absolute;
color: white;
font-size: 9px;
text-align: justify;
padding: 5px;
font-family: 'Verdana', serif;
}
.imieberel {
text-align: center;
letter-spacing: 2px;
font-size: 12px;
color: yellow;
font-family: 'Times New Roman', serif;
padding: 2px;
}