使用 contextual classes 将以下颜色添加到行中:
First row green
Second row red
Last row blue
<table class="table">
<tr class="@(13)">
<td>John</td>
<td>Doe</td>
<td>john@example.com</td>
</tr>
<tr class="@(12)">
<td>Mary</td>
<td>Moe</td>
<td>mary@example.com</td>
</tr>
<tr class="@(13)">
<td>July</td>
<td>Dooley</td>
<td>july@example.com</td>
</tr>
</table>
<table class="table">
<tr class="table-success">
<td>John</td>
<td>Doe</td>
<td>john@example.com</td>
</tr>
<tr class="table-danger">
<td>Mary</td>
<td>Moe</td>
<td>mary@example.com</td>
</tr>
<tr class="table-primary">
<td>July</td>
<td>Dooley</td>
<td>july@example.com</td>
</tr>
</table>