polar-origin-center-001.html (969B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: Origin of Coordinates</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-origin-property" /> 7 <meta name="assert" content="Test checks that the origin of the coordinate system specified with 'polar-origin'." /> 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: center; 17 width: 50px; 18 height: 50px; 19 background-color: red; 20 } 21 </style> 22 </head> 23 <body> 24 <p>Test passes if the upper left corner of a red box is positioned at the center of the containing block.<br> 25 The element is positioned using Cartesian coordinates and the origin of coordinates is the center of the containing block.</p> 26 <div class="container"> 27 <div class="item"></div> 28 </div> 29 </body> 30 </html>