| OLD | NEW |
| (Empty) | |
| 1 <style> |
| 2 body { |
| 3 margin: 0; |
| 4 } |
| 5 |
| 6 table { |
| 7 background: red; |
| 8 border-collapse: collapse; |
| 9 } |
| 10 |
| 11 td, th { |
| 12 height: 50px; |
| 13 width: 50px; |
| 14 padding: 0; |
| 15 } |
| 16 |
| 17 th { |
| 18 background: green; |
| 19 } |
| 20 |
| 21 .scroller { |
| 22 overflow: hidden; /* hide scrollbars */ |
| 23 width: 100px; |
| 24 height: 200px; |
| 25 outline: 2px solid black; |
| 26 } |
| 27 |
| 28 .sticky { |
| 29 position: sticky; |
| 30 top: 25px; |
| 31 } |
| 32 </style> |
| 33 |
| 34 <script> |
| 35 if (window.testRunner) |
| 36 testRunner.waitUntilDone(); |
| 37 |
| 38 function finishTest() { |
| 39 document.querySelector('.scroller').scrollTop = 200; |
| 40 if (window.testRunner) |
| 41 testRunner.notifyDone(); |
| 42 } |
| 43 |
| 44 window.addEventListener('load', function() { |
| 45 requestAnimationFrame(function() { |
| 46 requestAnimationFrame(finishTest); |
| 47 }); |
| 48 }); |
| 49 </script> |
| 50 |
| 51 <div class="scroller"> |
| 52 <table> |
| 53 <thead class="sticky"> |
| 54 <tr class="sticky"> |
| 55 <th class="sticky"></th> |
| 56 </tr> |
| 57 </thead> |
| 58 <tbody> |
| 59 <tr><td></td></tr> |
| 60 <tr><td></td></tr> |
| 61 <tr><td></td></tr> |
| 62 <tr><td></td></tr> |
| 63 <tr><td></td></tr> |
| 64 <tr><td></td></tr> |
| 65 <tr><td></td></tr> |
| 66 <tr><td></td></tr> |
| 67 <tr><td></td></tr> |
| 68 </tbody> |
| 69 </table> |
| 70 </div> |
| OLD | NEW |