#Bootstrap's context class allows you to change the background color of a table row or an individual cell.
The following are the categories:
Category | Description |
---|---|
.active | Apply hover color to specific rows or cells |
.success | Indicates a successful or positive operation |
.warning | indicates a warning that may require attention |
.danger | indicates danger or potential Negative operations |
The following is an example of the active class:
realtimedemo
<!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>
The above is the detailed content of Bootstrap context class. For more information, please follow other related articles on the PHP Chinese website!