JSFiddle - React, Tailwind, and code Playground

HTML

<div class="image">
    <img class="fade" src="http://www.newyorker.com/online/blogs/photobooth/NASAEarth-01.jpg" alt="" />
    <div class="text">TEST</div>
</div>

CSS

.image img {
width:200px;
height:200px;
}
.fade {
    opacity: 1;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.fade:hover {
    opacity: 0.4;
}
.image{
    background-color: black;
    width: 300px;
}
.text{
    color: red;
    position: absolute;
    top: 10px;
    left: 100px;
    visibility: hidden;
    width: 100%;
    height: 100%;
}
.text:hover{
    visibility: visible;
}
}