polar-origin-and-anchor-005.html (1243B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: Position an element with 'polar-origin' and 'polar-anchor'</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/#motion-paths-overview/"> 7 <meta name="assert" content="Test checks that the position of an element specified with 'polar-origin' and '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-origin: right bottom; 17 polar-anchor: left top; 18 polar-distance: 0px; 19 polar-angle: 90deg; 20 width: 50px; 21 height: 50px; 22 background-color: red; 23 } 24 </style> 25 </head> 26 <body> 27 <p>Test passes if the upper left corner of the red box is positioned at the lower right corner of the containing block's bottom edge.<br> 28 The element is positioned using polar coordinates.<br> 29 The origin of coordinates is at the lower right corner of the containing block.<br> 30 And the anchor point of the element is at its upper left corner.</p> 31 <div class="container"> 32 <div class="item"></div> 33 </div> 34 </body> 35 </html>