引导上下文类
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>
以上就是引导上下文类的详细内容,更多请关注双恒网络其它相关文章!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。



