polar-anchor-center-001.html (964B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: Anchor of the element</title> 5 <link rel="author" title="Jihye Hong" href="mailto:jh.hong@lge.com" /> 6 <link rel="help" href="https://www.w3.org/TR/motion-1/#polar-anchor-property"> 7 <meta name="assert" content="Test checks that the representative point of the element specified with 'polar-anchor'."> 8 <style type="text/css"> 9 .container { 10 width: 200px; 11 height: 200px; 12 border: medium solid black; 13 } 14 .item { 15 position: absolute; 16 polar-anchor: center; 17 width: 50px; 18 height: 50px; 19 background-color: red; 20 } 21 </style> 22 </head> 23 <body> 24 <p>Test passes if the center of a red box is positioned at the upper left corner of the containing block.<br> 25 The element is positioned using Cartesian coordinates and the anchor point is at its center.</p> 26 <div class="container"> 27 <div class="item"></div> 28 </div> 29 </body> 30 </html>