tor-browser

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

anchor-scroll-to-sticky-003-ref.html (511B)


      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  scrollbar-width: none;
     15 }
     16 
     17 #anchor {
     18  height: 20px;
     19  background: orange;
     20  position: relative;
     21 }
     22 
     23 #anchored {
     24  position: absolute;
     25  top: 20px;
     26  left: 0;
     27  background: green;
     28 }
     29 
     30 </style>
     31 
     32 <div id="anchored"></div>
     33 <div id="scroller">
     34  <div style="height: 200px"></div>
     35  <div id="anchor"></div>
     36  <div style="height: 150px"></div>
     37 </div>
     38 
     39 <script>
     40 scroller.scrollTop = 200;
     41 </script>