tor-browser

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

anchor-scroll-to-sticky-004-ref.html (486B)


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