I have a div with opacity applied, but this div has a child element. I do not want opacity to be applied to these child elements, would I have some way to solve it?
Example: link
Link code:
.div-pai{
width: 400px;
height: 400px;
background-color: black;
position: fixed;
opacity: 0.7;
}
.div-filho{
width: 150px;
height: 150px;
position:absolute;
top: 50%;
left: 50%;
background: blue;
margin-top: -75px;
margin-left: -75px;
opacity: 1;
}
<div class="div-pai">
<div class="div-filho"></div>
</div>