gpt4 book ai didi

css - 如何移动表中的特定 td 元素

转载 作者:太空宇宙 更新时间:2023-11-03 21:07:22 25 4
gpt4 key购买 nike

我有以下 following表结构,但我想将其更改为此 this表结构。

我查看了 SO 和其他地方的帖子,但未能找到解决方案。这可能使用 css 吗? This SO posts 是我找到的最接近的帖子,但它仍然无法按需工作。

有人可以指导我如何处理这个问题吗?

最佳答案

您可以使用每行一个表格作为一种变通方法,使用 CSS 作为边框,如下所示:

table {
border-collapse: collapse;
width: 100%;
}

td {
padding: 4px;
border: 1px solid #ccc;
border-bottom: none;
}

table:last-of-type td {
border-bottom: 1px solid #ccc;
}
<table>
<tr>
<td>Test Test Test Test Test Test</td>
<td>Test Test</td>
<td>Test Test Test Test</td>
</tr>
</table>
<table>
<tr>
<td>Test Test</td>
<td>Test Test Test Test</td>
<td>Test Test Test Test Test Test Test</td>
</tr>
</table>

关于css - 如何移动表中的特定 td 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51286897/

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