gpt4 book ai didi

css - 表格行的自动高度

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

JSFiddle example你可以看到 2 表行。我需要自动设置第一个的高度。第二个的高度需要设置到页面底部。但是浏览器将表格行高设置为50%...

.table {
display: table;
table-layout: auto;
}
html,body {
height: 100%;
min-height: 100% !important;
}

.row {
display: table-row;
border: 1px solid black;
}

最佳答案

在第二行设置height:100%

<div class="row">
<div>Some text</div>
<div>Text again</div>
</div>
<div class="row last">
<div>Need height to bottom</div>
</div>

CSS

.row {
display: table-row;
border: 1px solid black;
}
.last
{
height: 100%;
}

FIDDLE

关于css - 表格行的自动高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19078165/

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