gpt4 book ai didi

css - 在相同高度缩放 float div

转载 作者:行者123 更新时间:2023-12-05 08:00:41 26 4
gpt4 key购买 nike

我有这个 html:

<div class="exwrap">
<div class="listpages"> </div>
<div class="excerpt"> </div>
</div>`

和CSS:

.listpages {
width: 28%;
float: left;
height: 100%;
}

.excerpt {
width: 70%;
float: right;
height: 100%;
}

我希望 .listpages 和 .excerpt 具有相同的高度,但这仅在我具有固定高度的 .exwrap 时有效,但我需要具有动态高度并且较小的高度具有较大的高度。

谢谢。

最佳答案

float 是不可能的,但表格单元格(demo)可以:

.listpages {
width: 28%;
display: table-cell;
}

.excerpt {
width: 70%;
display: table-cell;
}

关于css - 在相同高度缩放 float div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17470081/

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