flex-shrink-007.html (1141B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Flexbox Test: flex-shrink - applied to flex container</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com"> 6 <link rel="help" title="7.3.2. The 'flex-shrink' property" href="http://www.w3.org/TR/css-flexbox-1/#flex-shrink-property"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="The flex-shrink property applied to flex container is invalid, all flex items will use the default value 1"> 9 <style> 10 #container { 11 background-color: red; 12 display: flex; 13 flex-shrink: 2; 14 height: 100px; 15 width: 100px; 16 } 17 #container div { 18 height: 100px; 19 width: 100px; 20 } 21 #test2 { 22 background-color: green; 23 } 24 #cover { 25 background-color: green; 26 height: 100px; 27 margin-top: -100px; 28 width: 50px; 29 } 30 </style> 31 <body> 32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 33 <div id="container"> 34 <div id="test1"></div> 35 <div id="test2"></div> 36 </div> 37 <div id="cover"></div> 38 </body>