Flex弹性布局
Flex
弹性布局
用于对齐的弹性布局容器。
| 使用import{ Flex }from"antd"; | 
| 文档编辑此页 | 
| 版本自 5.10.0 后支持 | 
Select justify :
Select align :
自
antd@5.10.0版本开始提供该组件。Flex 组件默认行为在水平模式下,为向上对齐,在垂直模式下,为拉伸对齐,你可以通过属性进行调整。
通用属性参考:通用属性
| 属性 | 说明 | 类型 | 默认值 | 版本 | 
|---|---|---|---|---|
| vertical | flex 主轴的方向是否垂直,使用 flex-direction: column | boolean | false | |
| wrap | 设置元素单行显示还是多行显示 | flex-wrap | boolean | nowrap | boolean: 5.17.0 | 
| justify | 设置元素在主轴方向上的对齐方式 | justify-content | normal | |
| align | 设置元素在交叉轴方向上的对齐方式 | align-items | normal | |
| flex | flex CSS 简写属性 | flex | normal | |
| gap | 设置网格之间的间隙 | small|middle|large| string | number | - | |
| component | 自定义元素类型 | React.ComponentType | div |