group-opacity-surface-size-1-ref.html (398B)
1 <!DOCTYPE html> 2 <style> 3 4 body { 5 margin: 0; 6 overflow: hidden; 7 } 8 9 .opacity { 10 opacity: 0.8; 11 } 12 13 .box { 14 left: 0; 15 top: 200px; 16 width: 200px; 17 height: 200px; 18 } 19 20 .absolute { 21 position: absolute; 22 background: green; 23 top: 100px; 24 } 25 26 .fixed { 27 position: absolute; 28 background: blue; 29 } 30 31 </style> 32 33 <div class="opacity"> 34 <div class="box absolute"></div> 35 <div class="box fixed"></div> 36 </div>