bootstrap <li class="active"></li>
时间: 2023-11-06 12:06:22 浏览: 85
bootstrap
5星 · 资源好评率100%
The "active" class in Bootstrap is used to indicate the currently active or selected item in a list or navigation menu.
In this case, the "<li>" element with the "active" class will be highlighted or styled differently to indicate that it is currently selected.
For example, if you have a navigation menu with several options and you want to indicate which page the user is currently on, you can add the "active" class to the "<li>" element that corresponds to that page. This way, the user can easily see which page they are currently on.
Here is an example of how you can use the "active" class in Bootstrap:
<ul class="nav">
<li><a href="#">Home</a></li>
<li class="active"><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
In this example, the "About" page is currently selected and will be highlighted in some way (depending on your CSS styles).
阅读全文