CSS Flexbox Ordering

 CSS Flexbox Ordering


CSS Flexbox allows you to control the order of flex items. By default, flex items are displayed in the order they appear in the HTML source. However, you can change their order using the order property. Here's an example:


.item:nth-child(2) {

  order: 1;

}

In this example, the second flex item will be displayed first.

No comments:

Post a Comment