I've stumbled upon an issue with rendering two overlapping elements with opacity = .5. The elements are exactly the same and positioned absolutely. One is on top of the other.
Common sense tells that the effect should give us an image with 100% opacity (0.5+0.5 = 1), but it doesn't.
I would really appreciate if anyone cared to explain the mechanism of rendering such elements, because clearly there's some underlying issue that I don't get.
HTML:
<div class="test">
<img src="..." alt="" width="200" height="200" class="t"/>
<img src="..." alt="" width="200" height="200" class="t"/>
</div>
<img src="..." alt="" width="200" height="200" class="test"/>
CSS:
.test{
float: left;
position:relative;
width: 200px;
height: 200px;
}
.test .t{
position:absolute;
top:0;
left:0;
opacity: 0.5;
}
jsFiddle
Thanks