Dear All,
I have a question about how a element's opacity affecting its children. I think the parent element's opacity shall cascade to its childen elements, for example:
"
<div id="parent" style:position="absolute" style:x="10px" style:y="10px" style:width="100px" style:height="100px" style:opacity="0.2">
<button id="children"
style:position="absolute"
style:x="5px" style:y="5px"
style:width="50px" style:height="50px"
style:opacity="0.8" />
</div>
"
I think button "children" shall be drawned as a half-transparent element with opacity=0.2*0.8=0.16, but I am not sure, so can someone tell me the right way to deal with such issue
Thank you!
Best Regards,
Rekan.

Question about how a element's opacity affecting its children.
qwv
VenkateshMD
In the short term, I would recommend not relying on current iHDSim behaviour. I would also recommend not setting opacity on any elements that have children (eg a <div> with some child buttons). If you want the background of the div to be transparent, I would recommend using another child div for that... for example, instead of:
I would suggest doing:
This will ensure that the appearance of your markup is independent of whether opacity multiplies or not. This should only be a short-term solution until the spec is clarified.
maryz
The HDDVD spec did not clearly define how opacity works for overlapped elements.
But if we follow the opacity in CSS3 and modern browser implementations,
you will find that the opacity is multiplied as 0.2*0.8 = 0.16
Mateusz Rajca