css – Bootstrap危险类不适用于表行

前端之家收集整理的这篇文章主要介绍了css – 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>

类’危险’的行不会改变颜色.但是,如果我使用“成功”类,它会正确更改.

我正在使用twitter-bootstrap-rails gem.

@H_403_9@解决方法
twitter-bootstrap gem目前正在使用bootstrap v 2.3.2.

根据Bootstrap version 2.3.2 Documentation For Tables以下是可用的行类:

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.

这就是为什么.success工作但不是.danger.

我想你正在寻找.error类.

原文链接:https://www.f2er.com/css/214780.html

猜你在找的CSS相关文章