Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS3 order Property</title> <style> .flex-container { height: 200px; width: 300px; font-size: 32px; border: 1px solid black; display: -webkit-flex; /* Safari */ display: flex; /* Standard syntax */ } .flex-container div { width: 100px; } .item1 { background: #e84d51; -webkit-order: 2; /* Safari 6.1+ */ order: 2; } .item2 { background: #7ed636; -webkit-order: 1; /* Safari 6.1+ */ order: 1; } .item3 { background: #2f97ff; -webkit-order: 3; /* Safari 6.1+ */ order: 3; } </style> </head> <body> <div class="flex-container"> <div class="item1">1</div> <div class="item2">2</div> <div class="item3">3</div> </div> </body> </html>