"Accordion"
Bootstrap 4.0.0 Snippet by xrozix

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="col-md-6"> <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingOne"> <h4 class="panel-title"> <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> Section 1 </a> </h4> </div> <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne"> <div class="panel-body"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros. </p> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingTwo"> <h4 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> Section 2 </a> </h4> </div> <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo"> <div class="panel-body"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros. </p> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="headingThree"> <h4 class="panel-title"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> Section 3 </a> </h4> </div> <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree"> <div class="panel-body"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisl lorem, dictum id pellentesque at, vestibulum ut arcu. Curabitur erat libero, egestas eu tincidunt ac, rutrum ac justo. Vivamus condimentum laoreet lectus, blandit posuere tortor aliquam vitae. Curabitur molestie eros. </p> </div> </div> </div> </div> </div> </div> </div>
a:hover,a:focus{ text-decoration: none; outline: none; } #accordion{ border: 2px solid #3485ef; border-radius: 20px; overflow: hidden; } #accordion .panel{ border: none; border-bottom: 2px solid #3485ef; box-shadow: none; border-radius: 0; margin: 0; } #accordion .panel:last-child{ border-bottom: none; } #accordion .panel-heading{ padding: 0; border: none; } #accordion .panel-title a{ display: block; padding: 20px; font-size: 18px; font-weight: 700; color: #fff; text-transform: uppercase; background: #3485ef; text-align: right; border: none; border-radius: 0; position: relative; transition: all 0.3s ease 0s; } #accordion .panel-title a.collapsed{ background: #fff; color: #3485ef; } #accordion .panel-title a.collapsed:hover{ background: #3485ef; color: #fff; } #accordion .panel-title a:after, #accordion .panel-title a.collapsed:after{ content: "\f107"; font-family: fontawesome; font-size: 25px; color: #fff; position: absolute; top: 17px; left: 20px; transition: all 0.3s ease-in-out 0s; } #accordion .panel-title a.collapsed:after{ content: "\f106"; color: #3485ef; } #accordion .panel-title a.collapsed:hover:after{ color: #fff; } #accordion .panel-body{ padding: 20px; border: none; font-size: 14px; color: #888; line-height: 25px; }

Related: See More


Questions / Comments: