tor-browser

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

position-sticky-hyperlink-ref.html (615B)


      1 <!DOCTYPE html>
      2 <title>Reference for sticky hyperlink should work on high dpi devices</title>
      3 
      4 <style>
      5 body {
      6    margin: 0;
      7 }
      8 
      9 .scroller {
     10  overflow: scroll;
     11  width: 200px;
     12  height: 200px;
     13 }
     14 
     15 .positioned {
     16  position: relative;
     17  top: 100px;
     18  will-change: transform;
     19 }
     20 
     21 .spacer {
     22  height: 700px;
     23 }
     24 </style>
     25 
     26 <script>
     27 window.addEventListener('load', function() {
     28  document.querySelector('.scroller').scrollTop = 100;
     29 });
     30 </script>
     31 
     32 <div>You should see a sticky link at the top of the scrollable area.</div>
     33 
     34 <div class='scroller'>
     35  <a href='#' class='positioned'>Link</a>
     36  <div class='spacer'></div>
     37 </div>