opacity-preserve3d-2.html (546B)
1 <!DOCTYPE html> 2 <html><head> 3 <style> 4 .first { 5 transform: translateZ(10px); 6 background-color: blue; 7 top: 50px; 8 } 9 .second { 10 transform: translateZ(5px); 11 background-color: green; 12 } 13 .preserve { 14 transform-style: preserve-3d; 15 } 16 .leaf { 17 width: 100px; 18 height: 100px; 19 position:absolute; 20 } 21 </style> 22 </head><body> 23 24 <div class="preserve" style="opacity:0.5"> 25 <div class="leaf first"></div> 26 <div class="leaf second"></div> 27 </div> 28 29 </body> 30 </html>