gpt4 book ai didi

html - 不重叠的 float div

转载 作者:行者123 更新时间:2023-11-28 13:14:49 25 4
gpt4 key购买 nike

我有 3 <div> s,我需要把第二个放在右边,所以我用了#two {float:right;} .

这是我的 current result : #one在左边,#two在右侧;两者都符合预期。问题是 #three浮起来。

我试着把 #one#two在一个单独的 div 中而不是 #three ,但问题依然存在。

这是我的 expected result : #three 的顶部应与 #two 的底部处于同一垂直位置.

最佳答案

您可以在您的 div3 上添加一个 clear:both

参见 DEMO

关于html - 不重叠的 float div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17892172/

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