flex-align-content-center.html (1021B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Flexible Box Test: align-content property - center</title> 5 <link rel="author" title="haosdent" href="mailto:haosdent@gmail.com"> 6 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-content-property"> 7 <link rel="match" href="reference/flex-align-content-center-ref.html"> 8 <meta name="assert" content="Statement describing what the test case is asserting"> 9 <style type="text/css"> 10 .container { 11 position: relative; 12 height: 6em; 13 width: 20em; 14 display: flex; 15 flex-wrap: wrap; 16 align-content: center; 17 background: red; 18 margin: 1em; 19 border: 1px solid black; 20 } 21 span { 22 height: 2em; 23 display: inline-block; 24 flex: none; 25 background: green; 26 color: white; 27 margin: 1em; 28 width: 8em; 29 } 30 </style> 31 </head> 32 <body> 33 <p>The test passed if you see a centered 2*2 table.</p> 34 <div class="container"> 35 <span>first</span> 36 <span>second</span> 37 <span>third</span> 38 <span>forth</span> 39 </div> 40 </body> 41 </html>