align-self-007.html (1373B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Flexbox Test: align-self - auto and align-items - flex-start</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" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property" title="8.3. Cross-axis Alignment: the 'align-items' and 'align-self' properties"> 7 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property" /> 8 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property"> 9 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 10 <meta name="assert" content="The 'align-self' property set 'auto' aligns flex items to start edge of cross-axis when 'align-items' set 'flex-start'"> 11 <style> 12 #test { 13 align-items: flex-start; 14 background-color: red; 15 display: flex; 16 height: 100px; 17 width: 100px; 18 } 19 #test div { 20 align-self: auto; 21 background-color: green; 22 height: 50px; 23 width: 25px; 24 } 25 #cover { 26 background-color: green; 27 height: 50px; 28 margin-top: -50px; 29 width: 100px; 30 } 31 </style> 32 <body> 33 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 34 <div id="test"> 35 <div></div> 36 <div></div> 37 <div></div> 38 <div></div> 39 </div> 40 <div id="cover"></div> 41 </body>