| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <!DOCTYPE html> | 
|  | 2 <script> | 
|  | 3 if (window.internals) { | 
|  | 4     internals.settings.setCSSStickyPositionEnabled(true); | 
|  | 5 } | 
|  | 6 </script> | 
|  | 7 | 
|  | 8 <html> | 
|  | 9 <head> | 
|  | 10 <style> | 
|  | 11     body { | 
|  | 12         margin: 0; | 
|  | 13         height: 2000px; | 
|  | 14         overflow: hidden; /* hide scrollbars */ | 
|  | 15     } | 
|  | 16 | 
|  | 17     .group { | 
|  | 18         display: inline-block; | 
|  | 19         position: relative; | 
|  | 20         width: 250px; | 
|  | 21         height: 500px; | 
|  | 22     } | 
|  | 23 | 
|  | 24     .container { | 
|  | 25         width: 200px; | 
|  | 26         height: 400px; | 
|  | 27         outline: 2px solid black; | 
|  | 28     } | 
|  | 29 | 
|  | 30     .box { | 
|  | 31         width: 200px; | 
|  | 32         height: 200px; | 
|  | 33     } | 
|  | 34 | 
|  | 35     .sticky { | 
|  | 36         background-color: silver; | 
|  | 37         position: sticky; | 
|  | 38         top: 100px; | 
|  | 39     } | 
|  | 40 | 
|  | 41     .indicator { | 
|  | 42         display: none; | 
|  | 43         position: absolute; | 
|  | 44         top: 250px; | 
|  | 45         left: 50px; | 
|  | 46         background-color: red; | 
|  | 47     } | 
|  | 48 </style> | 
|  | 49 <script> | 
|  | 50     function doTest() | 
|  | 51     { | 
|  | 52         window.scrollTo(0, 100); | 
|  | 53     } | 
|  | 54     window.addEventListener('load', doTest, false); | 
|  | 55 </script> | 
|  | 56 </head> | 
|  | 57 <body> | 
|  | 58     <div class="group"> | 
|  | 59         <div class="indicator box"></div> | 
|  | 60         <div class="container"> | 
|  | 61             <img src="../resources/greenbox.png" class="sticky box"> | 
|  | 62         </div> | 
|  | 63     </div> | 
|  | 64 | 
|  | 65     <div class="group" style="top: 100px"> | 
|  | 66         <div class="indicator box"></div> | 
|  | 67         <div class="container"> | 
|  | 68             <img src="../resources/greenbox.png" class="sticky box"> | 
|  | 69         </div> | 
|  | 70     </div> | 
|  | 71 | 
|  | 72 </body> | 
|  | 73 </html> | 
| OLD | NEW | 
|---|