I have the following code to darken the background image. Div with background image, then div inside what fills it with background color with transparency
<div class="slide">
<div class="slide-overlay">
<div class="slide-content">
<h1>Blah blah content</h1>
</div>
</div>
</div>
And I flock this way
.slide
background-image: url('/assets/img/bg-cover.jpg')
background-size: cover
.slide-overlay
background-color: rgba(0, 0, 0, .2)
Does anyone know a more elegant solution?
source
share