I have applied background-image to div with class="hero-contact-us" and opacity=0.3. I am not able to figure out why opacity property is applied to the child element with class="hero-contact-us-text". I will really appreciate your help.
<div class="hero-contact-us">
<div class="hero-contact-us-text">Some text here</div>
</div>
Here is the CSS
.hero-contact-us
{
background-image: url('media/pexels-ruslan-burlaka-140945.jpg');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
opacity: 0.3;
position: relative;
}
.hero-contact-us-text
{
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
color:#173348;
font-size: 1.5em;
z-index: 99;
opacity: 1;
}