flex-basis-002.html (1218B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Flexbox Test: flex-basis - positive number</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <link rel="author" title="Intel" href="mailto:shiyoux.tan@intel.com"> 6 <link rel="help" title="7.3.3. The 'flex-basis' property" href="http://www.w3.org/TR/css-flexbox-1/#flex-basis-property"> 7 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 8 <meta name="assert" content="The 'flex-basis' property specified correct value, the actual value of test element size is same as to the value of 'flex-basis' property, and the 'width' property is invalid."> 9 <style> 10 #container { 11 background-color: red; 12 display: flex; 13 height: 100px; 14 width: 100px; 15 } 16 #container div{ 17 height: 100px; 18 } 19 #test { 20 flex-basis: 60px; 21 width: 80px; 22 } 23 #ref { 24 background-color: green; 25 width: 40px; 26 } 27 #cover { 28 background-color: green; 29 height: 100px; 30 margin-top: -100px; 31 width: 60px; 32 } 33 </style> 34 <body> 35 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 36 <div id="container"> 37 <div id="test"></div> 38 <div id="ref"></div> 39 </div> 40 <div id="cover"></div> 41 </body>