如果您只是想在行周围设置边框,这样的事情是否适合您的情况?
CSS
table {
border-collapse: collapse;
}
td {
background: #ddd;
width: 100px;
}
.tr-border tr {
border: 2px solid red;
}
HTML
<table class="tr-border">
<tr>
<td>1</td>
<td>Lorem</td>
<td>123,456</td>
<td>XXXX</td>
<td>$10.24</td>
<td>Lorem Ipsum Dolor Sit Amet, Consect EturLorem Ipsum Dolor Sit Amet.</td>
</tr>
<tr>
<td>2</td>
<td>Lorem</td>
<td>123,456</td>
<td>XXXX</td>
<td>$10.24</td>
<td>Lorem Ipsum Dolor Sit Amet, Consect EturLorem Ipsum Dolor Sit Amet.</td>
</tr>
</table>
<br />
<table class="tr-border">
<tr>
<td>1</td>
<td>Lorem</td>
<td>123,456</td>
<td>XXXX</td>
<td>$10.24</td>
<td>Lorem Ipsum Dolor Sit Amet, Consect EturLorem Ipsum Dolor Sit Amet.</td>
</tr>
<tr>
<td>2</td>
<td>Lorem</td>
<td>123,456</td>
<td>XXXX</td>
<td>$10.24</td>
<td>Lorem Ipsum Dolor Sit Amet, Consect EturLorem Ipsum Dolor Sit Amet.</td>
</tr>
</table>
小提琴
http://jsfiddle.net/krishollenbeck/kxmhW/30/