OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <style> | |
3 .fixed { | |
4 position: fixed; | |
5 } | |
6 | |
7 .sticky { | |
8 position: sticky; | |
9 top: 0; | |
10 } | |
11 | |
12 .composited { | |
13 /* Force compositing without creating a stacking context */ | |
14 backface-visibility: hidden; | |
15 } | |
16 | |
17 .spacer { | |
18 height: 2000px; | |
19 } | |
20 | |
21 .container { | |
22 width: 500px; | |
23 height: 500px; | |
24 overflow: scroll; | |
25 } | |
26 </style> | |
27 | |
28 <div class="composited fixed"> | |
29 Ref text. | |
30 <div class="composited container"> | |
31 <div class="sticky"> | |
32 This line should line up with the text above. | |
33 </div> | |
34 <div class="spacer"></div> | |
35 </div> | |
36 </div> | |
37 | |
OLD | NEW |