anchor-position-circular.html (697B)
1 <!DOCTYPE html> 2 <title>Tests circular anchor relasionship</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-position-circular-ref.html"> 6 <style> 7 body { 8 margin: 0; 9 } 10 11 div { 12 width: 100px; 13 height: 100px; 14 } 15 16 #anchored1 { 17 position: absolute; 18 position-anchor: --a1; 19 left: anchor(left); 20 top: anchor(bottom); 21 background: orange; 22 anchor-name: --a2; 23 } 24 25 #anchored2 { 26 position: absolute; 27 position-anchor: --a2; 28 left: anchor(left); 29 top: anchor(bottom); 30 background: green; 31 anchor-name: --a1; 32 } 33 34 </style> 35 36 <div id="anchored1"></div> 37 <div id="anchored2"></div>