flexbox_justifycontent-spacearound.html (762B)
1 <!DOCTYPE html> 2 <title>flexbox | justify-content: space-around</title> 3 <link rel="author" href="http://opera.com" title="Opera Software"> 4 <link rel="help" 5 href="http://www.w3.org/TR/css-flexbox-1/#justify-content-property"> 6 <link rel="match" href="flexbox_justifycontent-spacearound-ref.html"> 7 <style> 8 div { 9 background: blue; 10 margin: 1em 0; 11 border: 1px solid black; 12 height: 8em; 13 width: 30em; 14 15 display: flex; 16 justify-content: space-around; 17 } 18 span { 19 background: white; 20 margin: 1em; 21 width: 5em; 22 max-width: 6em; 23 display: inline-block; 24 25 flex: 1 0 0%; 26 } 27 span:nth-child(1) {background: yellow;} 28 span:nth-child(2) {background: pink;} 29 span:nth-child(3) {background: lightblue;} 30 </style> 31 32 <div> 33 <span>one</span> 34 <span>two</span> 35 <span>three</span> 36 </div>