Hom*_*ith 7 css ruby-on-rails twitter-bootstrap
我的Rails应用程序中有以下表格:
<table class='table table-bordered table-hover table-striped'>
<thead>
<tr>
<th>ID</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr class='danger'>
<td><%= order.id %></td>
<td><%= order.status.name %></td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
类'危险'的行不会改变颜色.但是,如果我使用"成功"类,它会正确更改.
我正在使用twitter-bootstrap-rails gem.
twitter-bootstrap宝石目前正在使用bootstrap v 2.3.2.
并且根据Bootstrap版本2.3.2下表中的文档是可用的行类:
Optional row classes
Use contextual classes to color table rows.
.success Indicates a successful or positive action.
.error Indicates a dangerous or potentially negative action.
.warning Indicates a warning that might need attention.
.info Used as an alternative to the default styles.
Run Code Online (Sandbox Code Playgroud)
这是为什么.success有效,但不是.danger.
我想你在找.error课.