gpt4 book ai didi

html - CSS如何放置列

转载 作者:行者123 更新时间:2023-11-28 06:03:21 25 4
gpt4 key购买 nike

如何使用 css 水平放置列。

应该如何:

enter image description here

<table>
<tbody>
<tr>
<td>
First element column 1
</td>
</tr>
<tr>
<td>
Second element column 1
</td>
</tr>

<tr>
<td>
First element column 2
</td>
<td>
First element column 3
</td>
</tr>

<tr>
<td>
Second element column 2
</td>
<td>
Second element column 3
</td>
</tr>
</tbody>
</table>

我无法更改标记,因为所有标记都是 :

@foreach(var computer in department.Computers)
{
<tr >
<td>
@computer.ID
</td>
</tr>
}

@foreach (var employee in department.Employees)
{
<tr>
<td>
@employee.Text
</td>
<td>
@employee.Number
</td>
</tr>
}

最佳答案

    <table>
<tbody>
<tr>
<td>
First element column 1
</td>

<td>
First element column 2
</td>

<td>
First element column 3
</td>

</tr>

<tr>
<td>
Second element column 1
</td>
<td>
Second element column 2
</td>
<td>
Second element column 3
</td>
</tr>
</tbody>
</table>

关于html - CSS如何放置列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36624481/

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