blob: 8efbeb09e2030487f7f3fcd077fb53550a57dc94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<!DOCTYPE html>
<title>Tests circular anchor relasionship</title>
<link rel="author" href="mailto:wangxianzhu@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
<link rel="match" href="reference/anchor-position-circular-ref.html">
<style>
body {
margin: 0;
}
div {
width: 100px;
height: 100px;
}
#anchored1 {
position: absolute;
anchor-default: --a1;
left: anchor(--a1 left);
top: anchor(--a1 bottom);
background: orange;
anchor-name: --a2;
}
#anchored2 {
position: absolute;
anchor-default: --a2;
left: anchor(--a2 left);
top: anchor(--a2 bottom);
background: green;
anchor-name: --a1;
}
</style>
<div id="anchored1"></div>
<div id="anchored2"></div>
|