类似于 HTML/CSS 的浮动布局

发布于 2024-09-25 22:27:44 字数 111 浏览 0 评论 0原文

在 HTML/CSS 中,如果浮动项目,超出容器宽度的 DIV 会向下移动 1 行。

我想在 FLEX 中实现这一点。我有 3 个宽度可变的组件。我希望当第三个组件不再适合容器时将其向下移动。

In HTML/CSS, if you float items, DIV's that exceed the width of the container are moved down 1 line.

I would like to achieve this in FLEX. I have 3 components with variable width. I would like for the 3rd component to be moved down when it doesnt fit the container any more.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

-柠檬树下少年和吉他 2024-10-02 22:27:45

我相信您正在寻找的是 FlowLayout。以下是 Flex 4 的示例:
http://evtimmy.com/2009/06/flowlayout- a-spark-custom-layout-example/

如果您正在寻找在 Flex 4 (Spark) 之前工作的东西,您可以搜索“flex flow layout”或“flex flowbox”并找到几个示例。

希望有帮助。

I believe what you are looking for is a FlowLayout. Here's an example for Flex 4:
http://evtimmy.com/2009/06/flowlayout-a-spark-custom-layout-example/

If you are looking for something that works pre-Flex 4 (Spark), you can search for "flex flow layout" or "flex flowbox" and find several examples.

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文