I'm wondering if it's possible to do away with my second div/class opacity
and add the opacity to the image using CSS on the hero
class?
.hero {
background-image: url('https://cdn10.bostonmagazine.com/wp-content/uploads/sites/2/2016/03/nkotb.jpg');
background-size: cover;
position: relative;
height: 500px;
}
.hero .opacity {
background-color: rgba(0, 0, 0, 0.5);
height: 100%;
}
<div class="hero">
<div class="opacity">
</div>
</div>