例如,如果我有一个 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
andclear
have no effect on a flex item, and do not take it out-of-flow. However, thefloat
property can still affect box generation by influencing thedisplay
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/