tor-browser

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

anchor-scroll-fixedpos-002.html (735B)


      1 <!DOCTYPE html>
      2 <title>Tests that scroll adjustments of fixed-positioned elements are applied correctly</title>
      3 <link rel="author" href="mailto:wangxianzhu@chromium.org">
      4 <link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
      5 <link rel="match" href="reference/anchor-scroll-fixedpos-002-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  position: fixed;
     19  anchor-name: --a1;
     20  margin: 300px;
     21  background: orange;
     22 }
     23 
     24 #anchored {
     25  position: fixed;
     26  position-anchor: --a1;
     27  left: anchor(right);
     28  top: anchor(top);
     29  background: green;
     30 }
     31 
     32 </style>
     33 
     34 <div id="anchor"></div>
     35 <div id="anchored"></div>
     36 
     37 <script>
     38 document.documentElement.scrollTop = 200;
     39 </script>