我不确定您的意思,但您似乎希望能够以不同于其他列的方式为单个列着色。最简单的方法是使用 colgroup 和 col 标签:
css
.name {width:5em;background:#ccc;}
.value {width:3em;text-align:center;color:#f00;}
.comment {text-align:right;}
HTML
<table>
<caption>My Test Table</caption>
<col class="name">
<colgroup class="value" span="3"></colgroup>
<col class="comment">
</colgroup>
<tr>
<th>Name</th>
<th>Value 1</th>
<th>Value 2</th>
<th>Value 3</th>
<th>Comment</th>
</tr>
<tr>
<td>Bob</td>
<td>Yes</td>
<td>No</td>
<td>42</td>
<td>I like cheese</td>
</tr>
<tr>
<td>Susan</td>
<td>No</td>
<td>Yes</td>
<td>42</td>
<td>Sharp Cheddar</td>
</tr>
</table>
从http://www.webmasterworld.com/forum83/6826.htm窃取的代码
只有一部分 CSS 属性可以在列上设置。W3C 有一个列表。