JSFiddle - React, Tailwind, and code Playground

HTML

<div class='brick overlay-background dark' style='
		background-image: url("http://placeholdit/300px300");
		background-repeat: no-repeat;
		background-size: cover;
		background-position: center center;
		background-color: red'>
		<div class='v-center text-center freewall-content'><span>Demo</span></div>
</div>

CSS

.brick {
  width: 300px;
  height: 300px
}
.overlay-background {
    position: relative;
}
.overlay-background:before{
    position: absolute;
    content:" ";
    top:0;
    left:0;
    width:100%;
    height:100%;
    display: none;
    z-index:0;
}
.overlay-background:before{
    display: block;
}
.dark:before {
    background-color: rgba(0,0,0,0.7);
}
.dark:hover::before {
    background-color: rgba(0,0,0,0.2);
}
.freewall-content span {
    display: none
}
.freewall-content:hover span {
    display: block
}