flex-aspect-ratio-img-row-001.html (1226B)
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 width: 10px; 20 } 21 22 img { 23 min-width: 0; 24 min-height: 0; 25 flex: none; 26 height: 100px; 27 } 28 </style> 29 </head> 30 <body> 31 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 32 33 <div id="reference-overlapped-red"></div> 34 <div id="constrained-flex"> 35 <img id="test-flex-item-overlapping-green" src="support/100x100-green.png" /> 36 </div> 37 </body> 38 </html>