Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 .fixed { | |
| 4 position: fixed; | |
|
flackr
2017/05/19 18:28:31
I think will-change: transform will work just as w
yigu
2017/05/23 19:16:40
I think position:fixed is necessary to reproduce t
flackr
2017/05/23 19:19:59
Doesn't this imply that the test would still be br
| |
| 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 |