| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Reference for position:sticky top constraint should behave correctly for
<thead> elements</title> |
| 3 |
| 4 <style> |
| 5 .group { |
| 6 display: inline-block; |
| 7 position: relative; |
| 8 width: 150px; |
| 9 height: 200px; |
| 10 } |
| 11 |
| 12 .scroller { |
| 13 position: relative; |
| 14 width: 100px; |
| 15 height: 150px; |
| 16 overflow-x: hidden; |
| 17 overflow-y: auto; |
| 18 } |
| 19 |
| 20 .contents { |
| 21 height: 550px; |
| 22 } |
| 23 |
| 24 .indicator { |
| 25 position: absolute; |
| 26 background-color: green; |
| 27 left: 0; |
| 28 height: 50px; |
| 29 width: 50px; |
| 30 } |
| 31 </style> |
| 32 |
| 33 <script> |
| 34 window.addEventListener('load', function() { |
| 35 document.getElementById('scroller1').scrollTop = 50; |
| 36 document.getElementById('scroller2').scrollTop = 125; |
| 37 document.getElementById('scroller3').scrollTop = 250; |
| 38 }); |
| 39 </script> |
| 40 |
| 41 <div class="group"> |
| 42 <div id="scroller1" class="scroller"> |
| 43 <div class="indicator" style="top: 100px;"></div> |
| 44 <div class="contents"></div> |
| 45 </div> |
| 46 </div> |
| 47 |
| 48 <div class="group"> |
| 49 <div id="scroller2" class="scroller"> |
| 50 <div class="indicator" style="top: 150px;"></div> |
| 51 <div class="contents"></div> |
| 52 </div> |
| 53 </div> |
| 54 |
| 55 <div class="group"> |
| 56 <div id="scroller3" class="scroller"> |
| 57 <div class="indicator" style="top: 250px;"></div> |
| 58 <div class="contents"></div> |
| 59 </div> |
| 60 </div> |
| 61 |
| 62 <div>You should see three green boxes above. No red should be visible.</div> |
| OLD | NEW |