![]() |
VOOZH | about |
The CSS flexbox is a vital feature to develop the frontend, there are four directions available in CSS so in tailwind CSS all the properties are covered as in class form. It is the alternative of CSS flex-direction Property for fast development of front-end.
Note: To activate the flex-direction you have to include the flex class in your element before the flex-direction class.
Flex Direction:
Below is the example codes of each direction with the output:
flex-row: It arranges the row the same as the text direction. The default value of flex-direction is a row. It is used to specify that the item has a normal text direction. It makes the item follow the normal text direction in lines.
Syntax:
<element class="flex flex-row"> Contents... </element>Example:
Output:
👁 Imageflex-row-reverse: This class is used to follow the opposite text direction. It makes flex items in reverse order exactly the opposite of text direction as we can see in the Output.
Syntax:
<element class="flex flex-row-reverse"> Contents... </element>Example:
Output:
👁 Imageflex-col: It arranges the row as a column same as text direction but top to bottom. It is used to specify that the item has a normal top to bottom direction. It makes the item follow the normal top to bottom direction as we can see in the output.
Syntax:
<element class="flex flex-col"> Contents... </element>Example:
Output:
👁 Imageflex-col-reverse: It arranges the row as a column same as row-reverse bottom to top. It is used to specify that the item has a normal bottom to top direction. It makes the item follow the normal bottom to top direction as we can see in the output.
Syntax:
<element class="flex flex-col-reverse"> Contents... </element>Example:
Output:
👁 Image