nested-sticky-2-ref.html (700B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <style> 4 html, body { 5 margin: 0; 6 } 7 thead tr { 8 position: relative; 9 top: 50px; 10 } 11 th { 12 background-color: green; 13 height: 20px; 14 } 15 th:first-child { 16 position: relative; 17 top: 10px; 18 } 19 td { 20 background-color: blue; 21 } 22 </style> 23 <body> 24 <table cellspacing=0> 25 <thead> 26 <tr><th></th><th></th></tr> 27 </thead> 28 <tbody> 29 <tr><td style="height: 2000px; vertical-align: top">table cell</td><td>sibling</td></tr> 30 </tbody> 31 </table> 32 <script> 33 addEventListener('load', function() { 34 document.scrollingElement.scrollTop = 50; 35 document.documentElement.classList.remove('reftest-wait'); 36 }, false); 37 </script> 38 </html>