JSFiddle - React, Tailwind, and code Playground
HTML
<div class="block">
<div class="img-container">
<div class="qube"></div>
<img src="https://images.pexels.com/photos/540518/pexels-photo-540518.jpeg">
</div>
</div>
CSS
.img-container {
position: relative;
width: 500px;
}
.img-container img {
max-width:500px;
}
.qube {
height: 100px;
width: 200px;
left: 50%;
overflow: hidden;
top: 50%;
background-color: rgba(0, 0, 0, 0.28);
position: absolute;
transform: translateX(-50%) translateY(-50%);
}
.qube:after {
content: '';
background-color: rgba(255, 255, 255, 0.4);
position: relative;
width: 50px;
display: block;
height: 50px;
margin: 0 auto;
border-radius: 50%;
top: -25%;
}
}