"Bootstrap 4 Collapse Plus Minus Icons"
Bootstrap 4.1.1 Snippet by md-ataur

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <center> <h2>Bootstrap 4 Collapse Plus Minus Icons</h2> </center> <div class="accordion" id="accordionExample"> <div class="card"> <div class="card-header" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true"> <span class="title">Collapsible Group Item #1 </span> <span class="accicon"><i class="fas fa-angle-down rotate-icon"></i></span> </div> <div id="collapseOne" class="collapse show" data-parent="#accordionExample"> <div class="card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="card"> <div class="card-header collapsed" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> <span class="title">Collapsible Group Item #2</span> <span class="accicon"><i class="fas fa-angle-down rotate-icon"></i></span> </div> <div id="collapseTwo" class="collapse" data-parent="#accordionExample"> <div class="card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="card"> <div class="card-header collapsed" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false"> <span class="title">Collapsible Group Item #3</span> <span class="accicon"><i class="fas fa-angle-down rotate-icon"></i></span> </div> <div id="collapseThree" class="collapse" data-parent="#accordionExample"> <div class="card-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> </div> </div>
.accordion .card-header:after { font-family: "Font Awesome 5 Brands","Font Awesome 5 Free"; content: "\f146"; float: right; color: #7d7d7d; } .accordion .card-header.collapsed:after { font-family: "Font Awesome 5 Brands","Font Awesome 5 Free"; content: "\f0fe"; color: #7d7d7d; } .card-header .title { font-size: 17px; color: #000; } .card-header .accicon { float: right; font-size: 20px; width: 1.2em; } .card-header{ cursor: pointer; border-bottom: none; } .card{ border: 1px solid #ddd; } .card-body{ border-top: 1px solid #ddd; } .card-header:not(.collapsed) .rotate-icon { transform: rotate(180deg); }

Related: See More


Questions / Comments: