flex-aspect-ratio-027.html (649B)
1 <!DOCTYPE html> 2 <title>CSS aspect-ratio: auto size img with aspect-ratio inside column flexbox</title> 3 <link rel="help" href="https://www.w3.org/TR/css-sizing-4/#propdef-aspect-ratio"> 4 <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#layout-algorithm"> 5 <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> 6 7 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 8 <style> 9 div { 10 width: 100px; 11 display: flex; 12 flex-direction: column; 13 } 14 </style> 15 16 </head> 17 <body> 18 <div><img style="aspect-ratio: 1/1;" src="support/200x200-green.png" /></div> 19 </body> 20 </html>