For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/css/properties/flex-wrap.md.
Lynx
  • 简体中文
  • flex-wrap

    介绍

    定义弹性容器中的元件的在主轴的显示是单行(列)或者多行(列),以及在多行(列)情况下的堆叠方向。

    使用示例

    语法

    flex-wrap: nowrap; /* Default value */
    flex-wrap: wrap;
    flex-wrap: wrap-reverse;

    取值

    • nowrap

      默认值。弹性容器中的元件按照主轴的方向排列,有溢出容器的可能。

    • wrap

      弹性容器中的元件按照主轴的方向排列,元件会被打断放到不同的行(列)保证主轴方向元件不会溢出容器。

    • wrap-reverse

      wrap 的行为一样,但是行(列)的增加方向相反。

    形式定义

    初始值nowrap
    适用元素弹性容器
    是否支持继承
    是否支持动画

    形式语法

    flex-wrap =
      nowrap        |
      wrap          |
      wrap-reverse

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。