gpt4 book ai didi

html - 为什么我的表没有行?

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

我的代码遇到了问题。我是 html 和 css 的新手,所以问题是当我在浏览器中打开时,我的 table 没有在我的行之间显示任何行。

你可以在这里看到结果:

http://i57.tinypic.com/ibyreb.png

这是我的部分代码:

<table class="table" border="1" style="background-color:#FFFFFF;border-collapse: collapse;;border:1px solid #000000;color:#000000;width:90%;" cellpadding="5" cellspacing="3">
<th bgcolor="#545454">Header1</th>
<th bgcolor="#545454">Header2</th>
<th bgcolor="#545454">Header3</th>
<th bgcolor="#545454">Header4</th>

<tr>
<td>Table Cell</td>
<td>Table Cell</td>
<td>Table Cell</td>
<td>Table Cell</td>
</tr>
<tr>
<td bgcolor="#D1D1D1">Table Cell</td>
<td bgcolor="#D1D1D1">Table Cell</td>
<td bgcolor="#D1D1D1">Table Cell</td>
<td bgcolor="#D1D1D1">Table Cell</td>
</tr>
<tr>
<td>Table Cell</td>
<td>Table Cell</td>
<td>Table Cell</td>
<td>Table Cell</td>
</tr>
<tr>
<td bgcolor="#D1D1D1">Table Cell</td>
<td bgcolor="#D1D1D1">Table Cell</td>
<td bgcolor="#D1D1D1">Table Cell</td>
<td bgcolor="#D1D1D1">Table Cell</td>
</tr>
</table>

这是我的 CSS:

.table{
background-color:#FFFFFF;
border-collapse: collapse;
border:1px solid #000000;
color:#000000;width:90%;
}

最佳答案

设计你的 td 标签

td
{
border:solid 1px #000;
border-collapse:collapse;
}

希望这有帮助

关于html - 为什么我的表没有行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28472248/

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