Bootstrap 3 Collapse State with Chevron Icons
The Bootstrap 3 framework provides an example for using a chevron icon to display the collapse state of an element. The following code adds a chevron icon to each panel heading and toggles the icon when the panel is collapsed or expanded:
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script> <div>
This solution uses the Bootstrap CSS classes to display the chevron icon, and toggles the glyphicon-chevron-down and glyphicon-chevron-up classes when the panel collapses or expands.
The above is the detailed content of How to Use Chevron Icons to Indicate Bootstrap 3 Collapse State?. For more information, please follow other related articles on the PHP Chinese website!