OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 .set { | 5 .set { |
6 position: absolute; | 6 position: absolute; |
7 top: 8px; | 7 top: 8px; |
8 } | 8 } |
9 .box { | 9 .box { |
10 height: 100px; | 10 height: 100px; |
11 width: 100px; | 11 width: 100px; |
12 background-color: lightblue; | 12 background-color: lightblue; |
13 } | 13 } |
14 .squashed { | 14 .squashed { |
15 height: 40px; | 15 height: 40px; |
16 width: 40px; | 16 width: 40px; |
17 background-color: lightgreen; | 17 background-color: lightgreen; |
18 position: absolute; | 18 position: absolute; |
19 left: 16px; | 19 left: 16px; |
20 } | 20 } |
21 .composited { | 21 .composited { |
22 -webkit-transform: translateZ(0px); | 22 transform: translateZ(0px); |
23 } | 23 } |
24 .rotated { rotate(10deg); | 24 .rotated { rotate(10deg); |
25 } | 25 } |
26 </style> | 26 </style> |
27 </head> | 27 </head> |
28 <body> | 28 <body> |
29 <!-- This div will be the "owner" of the squashing layer --> | 29 <!-- This div will be the "owner" of the squashing layer --> |
30 <div class="composited rotated box"></div> | 30 <div class="composited rotated box"></div> |
31 <div id="target" class="squashed" style="top: 4px"></div> | 31 <div id="target" class="squashed" style="top: 4px"></div> |
32 <div class="squashed" style="top: 54px"></div> | 32 <div class="squashed" style="top: 54px"></div> |
33 </body> | 33 </body> |
34 </html> | 34 </html> |
OLD | NEW |