| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <style> | 2 <style> |
| 3 body { | 3 body { |
| 4 -webkit-transform: translateZ(0); | 4 transform: translateZ(0); |
| 5 } | 5 } |
| 6 #overlapper { | 6 #overlapper { |
| 7 width: 400px; | 7 width: 400px; |
| 8 height: 400px; | 8 height: 400px; |
| 9 left: 200px; | 9 left: 200px; |
| 10 background: gray; | 10 background: gray; |
| 11 position: absolute; | 11 position: absolute; |
| 12 -webkit-transform: translateZ(0); | 12 transform: translateZ(0); |
| 13 } | 13 } |
| 14 | 14 |
| 15 #container { | 15 #container { |
| 16 -webkit-perspective: 1400px; | 16 -webkit-perspective: 1400px; |
| 17 position: absolute; | 17 position: absolute; |
| 18 width: 180px; | 18 width: 180px; |
| 19 height: 180px; | 19 height: 180px; |
| 20 background: papayawhip; | 20 background: papayawhip; |
| 21 } | 21 } |
| 22 | 22 |
| 23 #composited { | 23 #composited { |
| 24 width: 100px; | 24 width: 100px; |
| 25 height: 100px; | 25 height: 100px; |
| 26 background: green; | 26 background: green; |
| 27 position: absolute; | 27 position: absolute; |
| 28 -webkit-transform: translateZ(10px); | 28 transform: translateZ(10px); |
| 29 } | 29 } |
| 30 | 30 |
| 31 #squashed { | 31 #squashed { |
| 32 position: absolute; | 32 position: absolute; |
| 33 left: 200px; | 33 left: 200px; |
| 34 width: 50px; | 34 width: 50px; |
| 35 height: 50px; | 35 height: 50px; |
| 36 background: blue; | 36 background: blue; |
| 37 } | 37 } |
| 38 </style> | 38 </style> |
| 39 <div id="overlapper"></div> | 39 <div id="overlapper"></div> |
| 40 <div id="container"> | 40 <div id="container"> |
| 41 <div id="composited"></div> | 41 <div id="composited"></div> |
| 42 </div> | 42 </div> |
| 43 <div id="squashed"></div> | 43 <div id="squashed"></div> |
| 44 | 44 |
| OLD | NEW |