Skip to content
Taffy Layout Logo
Taffy Layout
文档API基准测试游乐场
Taffy Layout Logo
Taffy Layout
文档
关于 Taffy
入门指南
核心概念
样式
显示模式 (Display)
尺寸 (Size)
纵横比 (Aspect Ratio)
外边距 (Margin)
内边距 (Padding)
边框 (Border)
间距 (Gap)
Flex 方向 (Flex Direction)
Flex 换行 (Flex Wrap)
Flex 基准 (Flex Basis)
Flex 增长 (Flex Grow)
Flex 收缩 (Flex Shrink)
主轴对齐 (Justify Content)
交叉轴对齐 (Align Items)
自身对齐 (Align Self)
多行对齐 (Align Content)
网格布局 (Grid)
网格模板 (Grid Templates)
网格列 (Grid Column)
网格行 (Grid Row)
网格自动流向 (Grid Auto Flow)
定位 (Positioning)
内嵌偏移 (Inset)
溢出 (Overflow)
布局实例手册
高级主题

Flex 换行 (Flex Wrap)

控制子元素是保持在一行还是可以换行。

flexWrap 属性控制当子元素在主轴方向的单行中放不下时的行为。

取值

值描述
NoWrap默认值。所有子元素保持在一行。它们可能会收缩(如果设置了 flexShrink)或溢出容器。
Wrap子元素在需要时换行到多行,从上到下排列。
WrapReverse子元素在需要时换行到多行,从下到上排列。

示例

Loading Preview…

后续步骤

  • Flex 基准 (Flex Basis)
  • 多行对齐 (Align Content)

本页导航

取值示例后续步骤

© 2026 ByteLand Technology Limited