tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

anchor-scroll-to-sticky-001-ref.html (464B)


      1 <!DOCTYPE html>
      2 <style>
      3 body {
      4  margin: 0;
      5 }
      6 
      7 div {
      8  width: 100px;
      9  height: 100px;
     10 }
     11 
     12 #scroller {
     13  overflow: scroll;
     14 }
     15 
     16 #anchor {
     17  height: 20px;
     18  background: orange;
     19 }
     20 
     21 #anchored {
     22  position: absolute;
     23  top: 20px;
     24  left: 0;
     25  background: green;
     26 }
     27 
     28 </style>
     29 
     30 <div id="scroller">
     31  <div style="height: 200px"></div>
     32  <div id="anchor"></div>
     33  <div style="height: 150px"></div>
     34 </div>
     35 <div id="anchored"></div>
     36 
     37 <script>
     38 scroller.scrollTop = 200;
     39 </script>