title: Add opacity to background-image CSS for hero cover
body: <p>I'm wondering if it's possible to do away with my second div/class <code>opacity</code> and add the opacity to the image using CSS on the <code>hero</code> class?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.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%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="hero"&gt;
    &lt;div class="opacity"&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>