
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>以上就是引导上下文类的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号