flexitem-stretch-image.html (1181B)
1 <!DOCTYPE html> 2 <html> 3 <title>CSS Flexbox: image stretch</title> 4 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property"> 5 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto"> 6 <link href="support/flexbox.css" rel="stylesheet"> 7 <meta name="assert" content="This test ensures that flexbox stretches a given image 8 to fit the size of flexitem according to flex values."> 9 <style> 10 .flexbox { 11 width: 600px; 12 display: flex; 13 background-color: #aaa; 14 position: relative; 15 min-height: 10px; 16 } 17 .flexbox > * { 18 margin: 0; 19 border: 0; 20 padding: 0; 21 min-width: 0; 22 } 23 </style> 24 <script src="/resources/testharness.js"></script> 25 <script src="/resources/testharnessreport.js"></script> 26 <script src="/resources/check-layout-th.js"></script> 27 <body onload="checkLayout('.flexbox')"> 28 <div id=log></div> 29 30 <div class="flexbox"> 31 <img data-expected-display="block" data-expected-width="345" data-expected-height="345" style="flex: 1 0 auto;" src="support/100x100-blue.png"> 32 <img data-expected-display="block" data-expected-width="255" data-expected-height="345" style="flex: 1 0 auto;" src="support/10x10-green.png"> 33 </div> 34 35 </body>