gpt4 book ai didi

html - 我可以同时使用 flexbox 和 float 吗?或者使用具有绝对定位的 flexbox?

转载 作者:行者123 更新时间:2023-11-28 16:56:50 25 4
gpt4 key购买 nike

例如,如果我有一个 2 列布局(主要内容和旁边),我可以将主要内容向左浮动,向左/向右浮动,然后使用 flexbox 使旁边与主要内容具有相同的高度吗?

我是否必须将整个容器显示到 flexbox 以包括页眉、主要内容、旁边和页脚,或者我可以只挑选一个区域来使用 flexbox?

最佳答案

来自 Overview ,

Flex layout is superficially similar to block layout. It lacks many of the more complex text- or document-centric properties that can be used in block layout, such as floats

来自 Flex Containers ,

float and clear have no effect on a flex item, and do not take it out-of-flow. However, the float property can still affect box generation by influencing the display property’s computed value.

来自 Absolutely-Positioned Flex Children ,

An absolutely-positioned child of a flex container does not participate in flex layout. However, it does participate in the reordering step (see order), which has an effect in their painting order.

关于html - 我可以同时使用 flexbox 和 float 吗?或者使用具有绝对定位的 flexbox?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31953105/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com