I was just playing around with a similar problem on codepen, this is what I did to create an overlay using a simple css markup. I created a div element with class .box applied to it. Inside this div I created two divs, one with .inner class applied to it and the other with .notext class applied to it. Both of these classes inside the .box div are initially set to display:none but when the .box is hovered over, these are made visible.
.box{_x000D_
height:450px;_x000D_
width:450px;_x000D_
border:1px solid black;_x000D_
margin-top:50px;_x000D_
display:inline-block;_x000D_
margin-left:50px;_x000D_
transition: width 2s, height 2s;_x000D_
position:relative;_x000D_
text-align: center;_x000D_
background:url('https://upload.wikimedia.org/wikipedia/commons/c/cd/Panda_Cub_from_Wolong,_Sichuan,_China.JPG');_x000D_
background-size:cover;_x000D_
background-position:center;_x000D_
_x000D_
}_x000D_
.box:hover{_x000D_
width:490px;_x000D_
height:490px;_x000D_
}_x000D_
.inner{_x000D_
border:1px solid red;_x000D_
position:relative;_x000D_
width:100%;_x000D_
height:100%;_x000D_
top:0px;_x000D_
left:0px;_x000D_
display:none; _x000D_
color:white;_x000D_
font-size:xx-large;_x000D_
z-index:10;_x000D_
}_x000D_
.box:hover > .inner{_x000D_
display:inline-block;_x000D_
}_x000D_
.notext{_x000D_
height:30px;_x000D_
width:30px;_x000D_
border:1px solid blue;_x000D_
position:absolute;_x000D_
top:0px;_x000D_
left:0px;_x000D_
width:100%;_x000D_
height:100%;_x000D_
display:none;_x000D_
}_x000D_
.box:hover > .notext{_x000D_
background-color:black;_x000D_
opacity:0.5;_x000D_
display:inline-block;_x000D_
}
_x000D_
<div class="box">_x000D_
<div class="inner">_x000D_
<p>Panda!</p>_x000D_
</div>_x000D_
<div class="notext"></div>_x000D_
</div>
_x000D_
Hope this helps! :) Any suggestions are welcome.