tor-browser

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

scroll-timeline-default-iframe-ref.html (765B)


      1 <!DOCTYPE html>
      2 <title>Reference for default scroll() timeline</title>
      3 <iframe width="400" height="400" srcdoc='
      4  <html>
      5  <style>
      6    html {
      7      print-color-adjust: exact;
      8      min-height: 100%;
      9      padding-bottom: 100px;
     10    }
     11 
     12    #box {
     13      width: 100px;
     14      height: 100px;
     15      background-color: green;
     16      transform: translateY(100px);
     17    }
     18 
     19    * {
     20      margin-top: 0px;
     21      margin-bottom: 0px;
     22    }
     23  </style>
     24  <script>
     25    window.addEventListener("load", function() {
     26      // Move the scroller to halfway.
     27      const scroller = document.scrollingElement;
     28      const maxScroll = scroller.scrollHeight - scroller.clientHeight;
     29      scroller.scrollTop = 0.5 * maxScroll;
     30    });
     31  </script>
     32  <div id="box"></div>
     33  </html>
     34 '></iframe>