flex-aspect-ratio-img-column-002.html (1431B)
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/#algo-cross-item" /> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 8 <meta name="assert" content="Test that we compute the correct aspect-ratio based cross size when a height is specified" /> 9 <style type="text/css"> 10 #reference-overlapped-red { 11 position: absolute; 12 background-color: red; 13 width: 100px; 14 height: 100px; 15 z-index: -1; 16 } 17 18 #constrained-flex { 19 display: flex; 20 flex-direction: column; 21 height: 10px; 22 } 23 24 img { 25 min-width: 0; 26 min-height: 0; 27 flex: none; 28 height: 100px; 29 align-self: flex-start; 30 } 31 </style> 32 </head> 33 <body> 34 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 35 36 <div id="reference-overlapped-red"></div> 37 <div id="constrained-flex"> 38 <img id="test-flex-item-overlapping-green" src="support/100x100-green.png" /> 39 </div> 40 </body> 41 </html>