aspect-ratio-003.html (1166B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Media Queries Test: max-aspect-ratio - 1280/720 ('aspect-ratio' property with prefix 'max')</title> 4 <link rel="author" title="Intel" href="http://www.intel.com/"> 5 <link name="author" title="Xin Liu" href="mailto:xinx.liu@intel.com"> 6 <link rel="help" title="4.6. aspect-ratio" href="http://www.w3.org/TR/css3-mediaqueries/#aspect-ratio"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="The 'aspect-ratio' property with prefix 'max' set '1280/720' means that the maximum of ratio is '1280/720', 9 only and only if the value of the 'width' to the value of the 'height' is lower than value of 'max-aspect-ratio', the style sheet will be applied. 10 The test runner will run this test in a 800/600 viewport (https://github.com/web-platform-tests/wpt/pull/12695)"> 11 <style> 12 div { 13 background-color: red; 14 height: 100px; 15 width: 100px; 16 } 17 @media screen and (max-aspect-ratio: 1280/720) { 18 div { 19 background-color: green; 20 } 21 } 22 </style> 23 <body> 24 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 25 <div></div> 26 </body>