JSFiddle - React, Tailwind, and code Playground
by ubaidillahhf
HTML
<div class="test">
<p>Beautiful image with dark overlay</p>
</div>
CSS
.test {
width: 500px;
height: 400px;
background-size: cover;
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url("https://download.unsplash.com/photo-1428604467652-115d9d71a7f1");
position: relative;
}
.test p {
font-size: 23px;
color: #fff;
text-transform: uppercase;
font-family: sans-serif;
position: absolute;
top: 160px;
left: 22px;
}