gpt4 book ai didi

HTML 表格行 (tr) : How to set the height fixed, 等于最大高度元素

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

我的 html 页面中有一个表格。在里面,我有 trs 和 tds。

我的目标是以某种方式将每个 tr 的高度设置为与最大 tr 的高度相同。

例如:

我有 3 个 trs:在每个 tr 中我可以有一个图像。第一个没有图像,第二个图像高度为 20px,第三个图像高度为 30px。我的目标是将 3 个 trs 设置为 30px 高度 = 与最大图像的高度对齐。

谢谢。

最佳答案

如果你知道最大的<tr>预先设置高度,为所有设置高度tr在你的 CSS 文件中添加它:

tr {
height: <INSERT-HEIGHT-HERE>px;
}

关于HTML 表格行 (tr) : How to set the height fixed, 等于最大高度元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13802836/

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