flex-direction
时间: 2023-10-09 18:05:48 浏览: 59
flex
flex-direction is a CSS property that determines the direction in which flex items are laid out in a flex container. It specifies whether the container should arrange its contents horizontally (in a row) or vertically (in a column). The possible values for flex-direction are:
- row: This is the default value. Flex items are laid out in a horizontal row from left to right.
- row-reverse: Flex items are laid out in a horizontal row from right to left.
- column: Flex items are laid out in a vertical column from top to bottom.
- column-reverse: Flex items are laid out in a vertical column from bottom to top.
The flex-direction property can be applied to a parent container element that has display:flex or display:inline-flex property set.
阅读全文