【发布时间】:2011-10-07 17:10:56
【问题描述】:
您好,我正在尝试创建一个包含两个 4 行的表,每行有 2 个 tds。 我为我的 td 指定了不同的宽度,但每个 td 都采用相同的宽度,为什么? 下面是我的代码
<table style="width:400px;">
<tr>
<td style="background-color:Red; width:50px;"></td>
<td style="background-color:Red;width:70px;"></td>
</tr>
<tr>
<td style="background-color:Red; width:54px;"></td>
<td style="background-color:Red; width:80px;"></td>
</tr>
<tr>
<td style="background-color:Red; width:20px;"></td>
<td style="background-color:Red; width:40px;"></td>
</tr>
</table>![enter image description here][1]
【问题讨论】:
-
您好,图片已上传。我想用 3 种颜色分割每个条。
-
嗨 thirydot 是的,几乎相同,但我想将每个条分成 3 个部分,每个部分包含不同的颜色,条宽应取自 asp.net 中的代码隐藏。
-
自己动手做吧。您应该能够将我的演示拆开并弄清楚它是如何工作的。
标签: html