Tailwind CSS Order
Order is one of the best feature of tailwind CSS by using this class we can order the flex and gird items according to our requirements. There are lots of order class. This class is used to render flex and grid items in a different order than they appear in the DOM.
Order:
- order-1
- order-2
- order-3
- order-4
- order-5
- order-6
- order-7
- order-8
- order-9
- order-10
- order-11
- order-12
- order-first
- order-last
- order-none
Syntax:
<element order- number | string >
Parameter: This class accepts two types of parameters, but one at a time, can only follow the order number or the position you will mention.
- number: Integer number to follow the order index.
- string: In word order index position, only accept last and first.
Example: In this example, we set the order-last on the first flex item and set the order-first on the 5th flex item, now you can see the order list is different from the normal.
- HTML
Join the conversation