OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style type="text/css" media="screen"> | 4 <style type="text/css" media="screen"> |
5 .box { | 5 .box { |
6 height: 100px; | 6 height: 100px; |
7 width: 100px; | 7 width: 100px; |
8 background-color: blue; | 8 background-color: blue; |
9 } | 9 } |
10 .container { | 10 .container { |
11 position: absolute; | 11 position: absolute; |
12 margin: 10px; | 12 margin: 10px; |
13 left: 0; | 13 left: 0; |
14 top: 0; | 14 top: 0; |
15 z-index: -1; | 15 z-index: -1; |
16 background-color: red; | 16 background-color: red; |
17 } | 17 } |
18 | 18 |
19 .compositing { | 19 .compositing { |
20 -webkit-transform: translateZ(0); | 20 transform: translateZ(0); |
21 } | 21 } |
22 | 22 |
23 .foreground { | 23 .foreground { |
24 background-color: green; | 24 background-color: green; |
25 } | 25 } |
26 </style> | 26 </style> |
27 </head> | 27 </head> |
28 | 28 |
29 <body> | 29 <body> |
30 | 30 |
31 <div class="container box"> | 31 <div class="container box"> |
32 <div class="compositing"> | 32 <div class="compositing"> |
33 <div class="foreground box"></div> | 33 <div class="foreground box"></div> |
34 </div> | 34 </div> |
35 </div> | 35 </div> |
36 | 36 |
37 </body> | 37 </body> |
38 </html> | 38 </html> |
OLD | NEW |