nested-opacity-ref.html (417B)
1 <!DOCTYPE html> 2 <body> 3 <style> 4 body { 5 margin: 0; 6 } 7 8 .parent { 9 opacity: .4; 10 } 11 .child { 12 left: 50px; 13 top: 50px; 14 } 15 div.green { 16 position: absolute; 17 width: 100px; 18 height: 100px; 19 background: green; 20 will-change: opacity; 21 } 22 </style> 23 <div class="green parent"> 24 <div class="green child"></div> 25 </div> 26 </body>