HTML code
This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 4.5.0 included, to get the result that you can see in the preview selection
Download<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<section class="ftco-section bg-light ftco-faqs">
<div class="container">
<div class="row">
<div class="col-lg-6 order-md-last">
<div class="img img-video d-flex align-self-stretch align-items-center justify-content-center justify-content-md-center mb-4 mb-sm-0" style="background-image: url(https://www.bootdey.com/image/350x280/87CEFA/000000);">
<a href="#" class="icon-video popup-vimeo d-flex justify-content-center align-items-center">
<span class="fa fa-play"></span>
</a>
</div>
<div class="d-flex mt-3">
<div class="img img-2 mr-md-2" style="background-image: url(https://www.bootdey.com/image/240x240/FFB6C1/000000);"></div>
<div class="img img-2 ml-md-2" style="background-image: url(https://www.bootdey.com/image/240x240/20B2AA/000000);"></div>
</div>
</div>
<div class="col-lg-6">
<div class="heading-section mb-5 mt-5 mt-lg-0">
<h2 class="mb-3">Frequently Asks Questions</h2>
<p>Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.</p>
</div>
<div id="accordion" class="myaccordion w-100" aria-multiselectable="true">
<div class="card">
<div class="card-header p-0" id="headingOne">
<h2 class="mb-0">
<button href="#collapseOne" class="d-flex py-3 px-4 align-items-center justify-content-between btn btn-link" data-parent="#accordion" data-toggle="collapse" aria-expanded="true" aria-controls="collapseOne">
<p class="mb-0">How to train your pet dog?</p>
<i class="fa" aria-hidden="true"></i>
</button>
</h2>
</div>
<div class="collapse show" id="collapseOne" role="tabpanel" aria-labelledby="headingOne" style="">
<div class="card-body py-3 px-0">
<ol>
<li>Far far away, behind the word mountains</li>
<li>Consonantia, there live the blind texts</li>
<li>When she reached the first hills of the Italic Mountains</li>
<li>Bookmarksgrove, the headline of Alphabet Village</li>
<li>Separated they live in Bookmarksgrove right</li>
</ol>
</div>
</div>
</div>
<div class="card">
<div class="card-header p-0" id="headingTwo" role="tab">
<h2 class="mb-0">
<button
href="#collapseTwo"
class="d-flex py-3 px-4 align-items-center justify-content-between btn btn-link collapsed"
data-parent="#accordion"
data-toggle="collapse"
aria-expanded="false"
aria-controls="collapseTwo"
>
<p class="mb-0">How to manage your pets?</p>
<i class="fa" aria-hidden="true"></i>
</button>
</h2>
</div>
<div class="collapse" id="collapseTwo" role="tabpanel" aria-labelledby="headingTwo" style="">
<div class="card-body py-3 px-0">
<ol>
<li>Far far away, behind the word mountains</li>
<li>Consonantia, there live the blind texts</li>
<li>When she reached the first hills of the Italic Mountains</li>
<li>Bookmarksgrove, the headline of Alphabet Village</li>
<li>Separated they live in Bookmarksgrove right</li>
</ol>
</div>
</div>
</div>
<div class="card">
<div class="card-header p-0" id="headingThree" role="tab">
<h2 class="mb-0">
<button
href="#collapseThree"
class="d-flex py-3 px-4 align-items-center justify-content-between btn btn-link collapsed"
data-parent="#accordion"
data-toggle="collapse"
aria-expanded="false"
aria-controls="collapseThree"
>
<p class="mb-0">What is the best grooming for your pets?</p>
<i class="fa" aria-hidden="true"></i>
</button>
</h2>
</div>
<div class="collapse" id="collapseThree" role="tabpanel" aria-labelledby="headingTwo" style="">
<div class="card-body py-3 px-0">
<ol>
<li>Far far away, behind the word mountains</li>
<li>Consonantia, there live the blind texts</li>
<li>When she reached the first hills of the Italic Mountains</li>
<li>Bookmarksgrove, the headline of Alphabet Village</li>
<li>Separated they live in Bookmarksgrove right</li>
</ol>
</div>
</div>
</div>
<div class="card">
<div class="card-header p-0" id="headingFour" role="tab">
<h2 class="mb-0">
<button
href="#collapseFour"
class="d-flex py-3 px-4 align-items-center justify-content-between btn btn-link collapsed"
data-parent="#accordion"
data-toggle="collapse"
aria-expanded="false"
aria-controls="collapseFour"
>
<p class="mb-0">What are those requirements for sitting pets?</p>
<i class="fa" aria-hidden="true"></i>
</button>
</h2>
</div>
<div class="collapse" id="collapseFour" role="tabpanel" aria-labelledby="headingTwo">
<div class="card-body py-3 px-0">
<p>
Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in Bookmarksgrove right at the coast of the Semantics, a large
language ocean.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
CSS code
This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 4.5.0 included, to get the result that you can see in the preview selection
Downloadbody{margin-top:20px;}
.ftco-section {
padding: 7em 0;
position: relative;
}
.bg-light {
background: #f8f9fd !important;
}
.ftco-faqs .myaccordion {
margin: 0 auto;
overflow: hidden;
}
.ftco-faqs .myaccordion .card,
.ftco-faqs .myaccordion .card:last-child .card-header {
border: none;
background: transparent;
}
.ftco-faqs .myaccordion .card-header {
border: none;
background: transparent;
}
.ftco-faqs .myaccordion .card-header p {
position: relative;
font-weight: 500;
font-size: 18px;
text-align: left;
}
.ftco-faqs .myaccordion .fa {
font-size: 16px;
color: rgba(0, 0, 0, 0.3);
}
.ftco-faqs .myaccordion .btn {
width: 100%;
font-weight: 600;
color: black;
padding: 0;
text-transform: capitalize;
letter-spacing: 0;
border-radius: 0 !important;
margin-bottom: 10px;
border-radius: 40px !important;
-webkit-box-shadow: 0px 2px 8px -4px rgba(0, 0, 0, 0.21) !important;
-moz-box-shadow: 0px 2px 8px -4px rgba(0, 0, 0, 0.21) !important;
box-shadow: 0px 2px 8px -4px rgba(0, 0, 0, 0.21) !important;
}
.ftco-faqs .myaccordion .btn-link:hover,
.ftco-faqs .myaccordion .btn-link:focus {
text-decoration: none;
}
.ftco-faqs button[aria-expanded="true"] {
background-color: #00bd56;
color: #fff !important;
}
.ftco-faqs button[aria-expanded="false"] {
background-color: #fff;
}
.ftco-faqs .card-body {
background: #fff;
margin-bottom: 10px;
border-radius: 30px;
-webkit-box-shadow: 0px 2px 8px -4px rgba(0, 0, 0, 0.21) !important;
-moz-box-shadow: 0px 2px 8px -4px rgba(0, 0, 0, 0.21) !important;
box-shadow: 0px 2px 8px -4px rgba(0, 0, 0, 0.21) !important;
}
.ftco-faqs button[aria-expanded="true"] .fa {
color: #fff !important;
}
.ftco-faqs .myaccordion .fa {
font-size: 16px;
color: rgba(0, 0, 0, 0.3);
}
.ftco-faqs .myaccordion .fa {
font-size: 16px;
color: rgba(0, 0, 0, 0.3);
}
.ftco-faqs [data-toggle="collapse"].collapsed .fa:before {
content: "\f067";
font-family: "FontAwesome";
font-style: normal;
}
.ftco-faqs [data-toggle="collapse"] .fa:before {
content: "\f068";
font-family: "FontAwesome";
font-style: normal;
}
.ftco-faqs .img {
height: 450px;
-webkit-box-shadow: 0px 8px 21px -10px rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0px 8px 21px -10px rgba(0, 0, 0, 0.12);
box-shadow: 0px 8px 21px -10px rgba(0, 0, 0, 0.12);
}
.img, .blog-img, .user-img {
width: 100%;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
.icon-video {
width: 80px;
height: 80px;
background: #fff;
-webkit-animation: pulse 2s infinite;
animation: pulse 2s infinite;
-webkit-box-shadow: 0px 10px 30px -4px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 10px 30px -4px rgba(0, 0, 0, 0.15);
box-shadow: 0px 10px 30px -4px rgba(0, 0, 0, 0.15);
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
border-radius: 50%;
}
.align-items-center {
-webkit-box-align: center !important;
-ms-flex-align: center !important;
align-items: center !important;
}
.justify-content-center {
-webkit-box-pack: center !important;
-ms-flex-pack: center !important;
justify-content: center !important;
}
About this bootstrap example/template
This example/template, Frequently Asks Questions accordion, was published on Sep 25th 2020, 08:23 by Bootdey Admin and it is free.
We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.
We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.
This code example currectly have 7.5K views, Using this bootstrap snippet you have the following benefits:
Bootstrap 4.5.0
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>
This code example is based on bootstrap 4.5.0 and the grid system of this framework
Responsive
Based on bootstrap framework makes all the layouts perfectly responsive for all devices
Crossbrowser compatibility
Tested on all major browsers, it works smoothly on all of them
semantic html 5
Built on html / css3 the code quality is really amazing
Simple Integration
This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working