flex-aspect-ratio-img-column-001.html (1266B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Flexible Box Test: Aspect ratio handling of images</title> 5 <link rel="author" title="Google Inc." href="http://www.google.com/" /> 6 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#hypothetical-main-size" /> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 8 <style type="text/css"> 9 #reference-overlapped-red { 10 position: absolute; 11 background-color: red; 12 width: 100px; 13 height: 100px; 14 z-index: -1; 15 } 16 17 #constrained-flex { 18 display: flex; 19 flex-direction: column; 20 height: 10px; 21 } 22 23 img { 24 min-width: 0; 25 min-height: 0; 26 flex: none; 27 width: 100px; 28 } 29 </style> 30 </head> 31 <body> 32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 33 34 <div id="reference-overlapped-red"></div> 35 <div id="constrained-flex"> 36 <img id="test-flex-item-overlapping-green" src="support/100x100-green.png" /> 37 </div> 38 </body> 39 </html>