tor-browser

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

block-in-inline-3.html (1361B)


      1 <!DOCTYPE html>
      2 <!-- Any copyright is dedicated to the Public Domain.
      3   - http://creativecommons.org/publicdomain/zero/1.0/ -->
      4 <html>
      5  <head>
      6    <title>CSS Test: Sticky Positioning - block inside inline, contained position</title>
      7    <link rel="author" title="L. David Baron" href="mailto:dbaron@mozilla.com">
      8    <link rel="match" href="block-in-inline-3-ref.html">
      9    <meta name="assert" content="Inline elements split because they contain blocks should always have all parts moved the same offset from their normal position">
     10    <link rel="stylesheet" type="text/css" href="ahem.css">
     11    <style>
     12      #scroll {
     13        height: 100px;
     14        overflow: hidden;
     15        font: 20px/1 Ahem;
     16      }
     17      #contain {
     18        height: 100px;
     19      }
     20      #sticky {
     21        display: inline;
     22        position: sticky;
     23        top: 10px;
     24      }
     25    </style>
     26  </head>
     27  <body>
     28    <div id="scroll">
     29      <div style="height: 20px"></div>
     30      <div id="contain">
     31        before inline
     32        <div id="sticky">
     33          before block
     34          <div>in block</div>
     35          after block
     36        </div>
     37        after inline
     38      </div>
     39      <div style="height: 100px"></div>
     40    </div>
     41    <script type="application/javascript">
     42      // should start moving after 40px
     43      document.getElementById("scroll").scrollTop = 60;
     44    </script>
     45  </body>
     46 </html>