I have a parent div and a child div.
.container {
width: 300px;
height: 300px;
background-color: rgba(0, 0, 0, 0.7)
}
.child {
width: 200px;
height: 200px;
background-color: rgba(0, 0, 0, 0.3)
}
<div class="container">
<div class="child">
</div>
</div>
The child element background color looks different from rgba(0, 0, 0, 0.3)
as it is inheriting background color from parent.
Shouldn't the background color for the child look like rgba(0, 0, 0, 1)
as rgba(0, 0, 0, 0.3)
is applied on top of rgba(0, 0, 0, 0.7)
?
If you are down voting please put a comment why you are down voting.