flex-aspect-ratio-img-column-004.html (721B)
1 <!DOCTYPE html> 2 <link rel="author" title="Google LLC" href="http://www.google.com" /> 3 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#line-sizing" /> 4 <title>css-flexbox: Tests that we use the aspect ratio to compute the main size</title> 5 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 6 7 <style> 8 .flex { 9 display: flex; 10 width: 100px; 11 min-height: 500px; 12 flex-direction: column; 13 } 14 15 img { 16 max-width: 100%; 17 height: 100%; 18 width: 100%; 19 } 20 </style> 21 22 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 23 24 <div class="flex"> 25 <img src="support/300x150-green.png"> 26 <div style="width: 100px; height: 50px; background: green;"></div> 27 </div>