gpt4 book ai didi

css - 特定的 float 元素

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

我有标准 float 网格,类似于:

ul li{
width:300px;
float:left;
}

我需要将第 4 个元素置于第 3 个元素之下。就像图片上一样。

感谢您的建议!

enter image description here

最佳答案

有点像胶带解决方案,但可以通过将第 3 列和第 4 列放在同一个容器中来解决吗?

例如:

<ul>
<li>
(Column 1)
</li>
<li>
(Column 2)
</li>
<li>
<div style="float:left;">
(Column 3), (Column 4)
</div>
</li>
<li>
(Column 5)
</li>
</ul>

关于css - 特定的 float 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29407424/

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