I have two nested items in HTML and I want to give the wrraping one opacity 0.8 and the one inside it opacity 1.
I think I understand why it does not work, but, how can I mimick that effect?
Here is a simplified HTML that shows the problem, I want the green square to be solid.
<div style='background-color:red;
width: 500px;
height: 500px;
border: 1px solid black;
position: absolute;
top:0;
left:0;
opacity:0.8'>
<div style='width:150px; height:150px; background-color:green; opacity:1'>
Some content
</div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…