JSFiddle - React, Tailwind, and code Playground
HTML
<figure>
<img src="https://i.kinja-img.com/gawker-media/image/upload/bifqk4sdl9mggfbcv9vf.jpg" class="attachment-shop_catalog wp-post-image" alt="1" height="300" width="400">
<div id="effect">
<h3>Title</h3>
<span>this is an image</span>
<a href="http://www.w3schools.com/default.asp">read more</a>
</div>
</figure>
CSS
figure{
margin: 0px;
padding: 0px;
position: relative;
font-family: Myriad Pro;
}
figure img{
display: block;
position: relative;
z-index: 10;
border: 1px solid grey;
}
#effect h3 {
color: #fff;
font-size: 22px;
line-height: 1.2;
font-weight: 700;
margin-bottom: 10px;
}
#effect span {
color: #fff;
display: block;
line-height: 1.2;
margin-top: 100px;
font-size: 30px;
font-family: Myriad Pro;
}
#effect {
top: 0;
left: 0;
width: 400px;
height: 300px;
background-color: lightblue;
text-align: center;
position: absolute;
z-index: 11;
opacity: 0;
}
figure #effect:hover{
opacity: 0.9;
}