Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <script> | |
| 2 onload = function() { | |
| 3 scroller.scrollTop = 200; | |
| 4 } | |
| 5 </script> | |
| 6 <style> | |
| 7 .composited { | |
| 8 will-change: transform; | |
| 9 } | |
| 10 | |
| 11 #scroller { | |
| 12 overflow: scroll; | |
| 13 height: 200px; | |
| 14 width: 200px; | |
| 15 } | |
| 16 | |
| 17 .container { | |
| 18 height: 500px; | |
| 19 background: red; | |
| 20 } | |
| 21 | |
| 22 .sticky { | |
| 23 position: sticky; | |
| 24 top: 25px; | |
| 25 height: 50px; | |
| 26 background: green; | |
| 27 } | |
| 28 </style> | |
| 29 <div id="scroller" class="composited"> | |
| 30 <div class="composited container"> | |
| 31 <div class="composited container"> | |
| 32 <div class="composited container"> | |
|
chrishtr
2017/02/28 19:36:28
Why have three nested "composited container" eleme
smcgruer
2017/03/01 19:58:39
No real reason. Makes me feel better that it still
| |
| 33 <div class="composited sticky"></div> | |
| 34 </div> | |
| 35 </div> | |
| 36 </div> | |
| 37 </div> | |
| OLD | NEW |