flex-direction
时间: 2023-10-11 10:14:07 浏览: 34
Flex-direction is a CSS property that defines the direction of the main axis of a flex container. The main axis is the primary axis that items are laid out along in a flex container, and it can be either horizontal (row) or vertical (column). The flex-direction property can be set to one of four values:
- row: items are laid out horizontally in a single row
- row-reverse: items are laid out horizontally in a single row, but in reverse order
- column: items are laid out vertically in a single column
- column-reverse: items are laid out vertically in a single column, but in reverse order
By default, the value of flex-direction is row, which means that items are laid out horizontally in a single row. However, this property can be used to change the layout of items in a flex container to suit the design of a webpage or application.