gpt4 book ai didi

html - 创建 3 列垂直布局?

转载 作者:太空宇宙 更新时间:2023-11-04 13:56:39 25 4
gpt4 key购买 nike

我正在尝试创建一个三列垂直布局,水平布局并不难:

直播横向示例:http://jsfiddle.net/NQU9u/

但对于垂直方向,我尝试了与该代码相反的方法:

 <div style="width:100%; height :100%;  background-color:Lime;">
<div style="width:33%; height:100%; background-color:Blue;">
a
</div>
<div style="width:34%; height:100%; background-color:Gray;">
b
</div>
<div style="width:33%; height:100%; background-color:Aqua;">
c
</div>
</div>

遗憾的是这不起作用。

有什么帮助/建议吗?

最佳答案

<div style="width:100%; height :100%;  background-color:Lime;">
<div style="width:34%; height:100%; background-color:Blue; float:left;">
a
</div>
<div style="width:33%; height:100%; background-color:Gray; float:left;">
b
</div>
<div style="width:33%; height:100%; background-color:Aqua; float:left;">
c
</div>
</div>

关于html - 创建 3 列垂直布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21812098/

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