inheriting parent background color with alpha makes child background color different. why?
When parent is having some background color with alpha(rgba) and child is inheriting parent background color why is child color different from parent?
.parent {
width: 200px;
height: 200px;
background: rgba(2, 107, 227, 0.2);
}
.child {
width: 100px;
height: 100px;
background: inherit;
}
<div class="parent">
<div class="child"></div>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</div>
Why is child background color is different from parent background-color?