sudhakarinfotech
(current)
Run Code
Live Code Editor- CSS 3 Flex Order
Source Code
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS Flex </title> <style> .flex-container { display: flex; flex-direction:row; background-color:lightgray; height:120px; } .flex-item{ background-color:orange; color:white; text-align:center; height:80px; width:80px; line-height:80px; margin:10px; padding:10px; } .bg-info{ background-color:#17A2B8; } .bg-primary{ background-color:#007BFF; } .bg-warning{ background-color:#FFC107; } </style> </head> <body> <h1>The order Property</h1> <div class="flex-container"> <div class="flex-item" style="order: 3">1</div> <div class="flex-item" style="order: 2">2</div> <div class="flex-item" style="order: 4">3</div> <div class="flex-item" style="order: 1">4</div> </div> </body> </html>
Source Code Output :
Running