"Bootstrap card with button control"
Bootstrap 4.1.1 Snippet by motein

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<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 ---------->
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<section id="price">
<div class="container text-center">
<h3>Get awesome features, without <br>
extra charges</h3>
<p class="firstText">The rise of mobile devices transforms the way we consume information entirely <br>
and the world's most elevant channels such as Facebook.</p>
<div class="firstCard text-center">
<div class="card-header bg-transparent border-0 m-auto">
<ul class="nav nav-pills card-header-pills" id="cardBtn">
<li class="nav-item">
<a class="nav-link btn priceBtn active" onclick="currentSlide(1)">Monthly</a>
</li>
<li class="nav-item">
<a class="nav-link btn priceBtn" onclick="currentSlide(2)">Annually</a>
</li>
</ul>
</div>
<div class="card-body">
<div class="priceSlides">
<div class="row">
<div class="col-md-6">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#price {
margin: 0 0 8%;
}
#price h3 {
color: #242f51;
font-size: 1.5em;
font-weight: bolder;
margin: 10% auto 2%;
}
#price .container .firstText{
font-size: large;
font-weight: 400;
color: #242f51;
margin-bottom: 5%;
}
#price .firstCard {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
}
#price .firstCard .col{
width: auto;
margin: auto;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var slideIndex = 1;
showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
var i;
var slides = document.getElementsByClassName("priceSlides");
var dots = document.getElementsByClassName("priceBtn");
if (n > slides.length) {slideIndex = 1}
if (n < 1) {slideIndex = slides.length}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: