Bootstrap的上下文类允许您更改表格行或单个单元格的背景颜色。

以下是类别:

类别

描述

.active

将悬停颜色应用于特定行或单元格

.success

表示成功或积极的操作

.warning

表示可能需要注意的警告

.danger

表示危险或潜在的负面操作

示例

以下是active类的示例:

示例

实时演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Table</title>
      <link href = /bootstrap/css/bootstrap.min.css rel=stylesheet>
      <script src = /scripts/jquery.min.js></script>
      <script src = /bootstrap/js/bootstrap.min.js></script>
   </head>
   <body>
      <table class = table>
         <thead>
            <tr>
               <th>Subject</th>
               <th>Marks</th>
               <th>Student</th>
            </tr>
         </thead>
         <tbody>
            <tr class = active>
               <td>Maths</td>
               <td>90</td>
               <td>Amit</td>
            </tr>
            <tr>
               <td>Science</td>
               <td>80</td>
               <td>Aman</td>
            </tr>
            <tr>
               <td>English</td>
               <td>85</td>
               <td>Rahul</td>
            </tr>
         </tbody>
      </table>
   </body>
</html>

以上就是引导上下文类的详细内容,更多请关注双恒网络其它相关文章!

简简单单挺好的

联系我们 订单查询