tor-browser

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

anchor-scroll-fixedpos.html (711B)


      1 <!DOCTYPE html>
      2 <title>Tests that scroll adjustments of fixed-positioned elements are applied correctly</title>
      3 <link rel="author" href="mailto:xiaochengh@chromium.org">
      4 <link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
      5 <link rel="match" href="reference/anchor-scroll-fixedpos-ref.html">
      6 <style>
      7 body {
      8  margin: 0;
      9  height: 2000px;
     10 }
     11 
     12 div {
     13  width: 100px;
     14  height: 100px;
     15 }
     16 
     17 #anchor {
     18  anchor-name: --a1;
     19  margin: 300px;
     20  background: orange;
     21 }
     22 
     23 #anchored {
     24  position: fixed;
     25  position-anchor: --a1;
     26  left: anchor(right);
     27  top: anchor(top);
     28  background: green;
     29 }
     30 
     31 </style>
     32 
     33 <div id="anchor"></div>
     34 <div id="anchored"></div>
     35 
     36 <script>
     37 document.documentElement.scrollTop = 200;
     38 </script>