File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+
3+ < link rel ="help " href ="https://drafts.csswg.org/css-anchor-1/#target ">
4+ < link rel ="author " title ="Kiet Ho " mailto ="mailto:kiet.ho@apple.com ">
5+ < script src ="/resources/testharness.js "> </ script >
6+ < script src ="/resources/testharnessreport.js "> </ script >
7+ < script src ="/resources/check-layout-th.js "> </ script >
8+ < script src ="support/test-common.js "> </ script >
9+
10+ < style >
11+ body { margin : 0px ; }
12+
13+ .containing-block {
14+ position : fixed;
15+ width : 200px ;
16+ height : 200px ;
17+ }
18+
19+ # anchor {
20+ left : 100px ;
21+ width : 100px ;
22+ height : 100px ;
23+ background-color : magenta;
24+ anchor-name : --anchor ;
25+ position : absolute;
26+ }
27+
28+ # anchored {
29+ width : 100px ;
30+ height : 100px ;
31+ background-color : green;
32+ position : fixed;
33+ left : anchor (--anchor left);
34+ top : anchor (--anchor bottom);
35+ }
36+ </ style >
37+
38+ < body onload ="checkLayoutForAnchorPos('.target') ">
39+ < div class ="containing-block ">
40+ < div id ="anchor "> </ div >
41+ < div id ="anchored " class ="target " data-offset-x ="100 " data-offset-y ="100 "> </ div >
42+ </ div >
43+ </ body >
You can’t perform that action at this time.
0 commit comments