为每个TD元素在表上设置的奇数/偶数样式,但由于行跨度而不起作用。 尝试在http://jsfiddle.net/eFp7F/61/奇数行甚至奇数行
CSS样式:
.tablerow1 td {
background-color:#FFFFFF;
}
.tablerow2 td {
background-color:green;
}
HTML代码:
<table border="1">
<tr>
<th>Type</th>
<th>Description</th>
<th>Number</th>
</tr>
<tr class="tablerow1">
<td rowspan="1"><p>Cash</p></td>
<td><p>Cash</p></td>
<td><p>00000</p></td>
</tr>
<tr class="tablerow2">
<td rowspan="2"><p>Receivables</p></td>
<td><p>Receivable</p></td>
<td><p>00</p></td>
</tr>
<tr>
<td><p>Accounts</p></td>
<td><p>0</p></td>
</tr>
</table>
怎么能解决这个问题?
你想要帐户也是绿色的? – 2014-10-09 13:37:03
你看起来像什么?你也想使用jQuery或只是CSS - 如果不删除jquery标签 – Rhumborl 2014-10-09 13:37:23
样式工作,因为它们设置。 – Regent 2014-10-09 13:37:28