flexbox_order.html (882B)
1 <!DOCTYPE html> 2 <title>flexbox | flex-flow: column-reverse wrap-reverse; order</title> 3 <link rel="author" href="http://opera.com" title="Opera Software"> 4 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#order-property"> 5 <link rel="match" href="flexbox_order-ref.html"> 6 <style> 7 div { 8 background: blue; 9 margin: 1em 0; 10 border: 1px solid black; 11 width: 20em; 12 height: 8em; 13 14 display: flex; 15 flex-flow: column-reverse wrap-reverse; 16 } 17 span { 18 background: white; 19 margin: 1em; 20 width: 8em; 21 height: 1.5em; 22 display: inline-block; 23 } 24 .one { 25 background: pink; 26 order: 4; 27 } 28 .two { 29 background: yellow; 30 order: 3; 31 } 32 .three { 33 background: black; 34 color: white; 35 order: 2; 36 } 37 .four { 38 background: fuchsia; 39 color: white; 40 order: 1; 41 } 42 </style> 43 44 <div> 45 <span class="one">one</span> 46 <span class="two">two</span> 47 <span class="three">three</span> 48 <span class="four">four</span> 49 </div>