Skip to content
On this page

Flex 弹性布局

https://antdv.com/components/flex-cn

Hidden Title

基础用法

常用属性

API

属性名说明类型默认值
justify设置元素在主轴方向上的对齐方式参考 flex-wrap justify-contentnowrap
align设置元素在交叉轴方向上的对齐方式参考 align-itemsnormal
wrap设置元素单行显示还是多行显示参考flex-wrapnowrap
directionflex-direction 属性指定了内部元素是如何在弹性容器中布局的,定义了主轴的方向(正方向或反方向)参考flex-direction row/row-reverse/column/colum-reverserow
flexCSS 简写属性设置了弹性项目如何增大或缩小以适应其弹性容器中可用的空间参考flexinitial
gap设置网格之间的间隙 smallmiddlelarge
component自定义元素类型Componentdiv