content logo

Bootstrap Tabs:

Green Tabs with Sliding Effect in Bootstrap

A nice bootstrap has a huge effect on the beauty of your website and if you choose your tabs carefully, you can make sure that the visitors will like your website and stay on that for a long time. We have prepared an attractive bootstrap code in this post and you can use it for gathering more people to your website. Green Tabs with Sliding Effect in Bootstrap are so effective with the best function. As you can see here, these Bootstrap Tabs have a white background and the writings are black, which makes a nice harmony with each other. As you select each section, you can see the details and the information of each one in a lighter color.

These HTML Tabs have a beautiful design that makes a difference from other simple websites. As you can see in the preview, the main page of this tab is plain and as soon as you select one part, a beautiful animating effect will be shown that makes the tab more attractive. The color of these Tabs with Sliding Effect is green and this changing color will happen smoothly. The Animating Bootstrap Tabs will represent in a faded way and the color of the writing will also change to green.

 

#

Bootstrap Tabs

#

Tabs with Sliding Effect

#

Animating Bootstrap Tabs

#

Simple HTML Tabs

<!-- This script got from frontendfreecode.com -->
<div class="container">
    <div class="row">
        <div class="col-md-offset-3 col-md-6">
            <div class="tab" role="tabpanel">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#Section1" aria-controls="home" role="tab" data-toggle="tab">Section 1</a></li>
                    <li role="presentation"><a href="#Section2" aria-controls="profile" role="tab" data-toggle="tab">Section 2</a></li>
                    <li role="presentation"><a href="#Section3" aria-controls="messages" role="tab" data-toggle="tab">Section 3</a></li>
                </ul>
                <!-- Tab panes -->
                <div class="tab-content tabs">
                    <div role="tabpanel" class="tab-pane fade in active" id="Section1">
                        <h3>Section 1</h3>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper, magna a ultricies volutpat, mi eros viverra massa, vitae consequat nisi justo in tortor. Proin accumsan felis ac felis dapibus, non iaculis
                            mi varius.
                        </p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section2">
                        <h3>Section 2</h3>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper, magna a ultricies volutpat, mi eros viverra massa, vitae consequat nisi justo in tortor. Proin accumsan felis ac felis dapibus, non iaculis
                            mi varius.
                        </p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section3">
                        <h3>Section 3</h3>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper, magna a ultricies volutpat, mi eros viverra massa, vitae consequat nisi justo in tortor. Proin accumsan felis ac felis dapibus, non iaculis
                            mi varius.
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
body {
    margin: 20px;
}
a:hover,
a:focus {
    text-decoration: none;
    outline: none;
}
.tab {
    font-family: "Nunito", sans-serif;
}
.tab .nav-tabs {
    background-color: transparent;
    border: none;
}
.tab .nav-tabs li a {
    color: #222;
    background: transparent;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    padding: 15px 15px 10px;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li:last-child a {
    margin-right: 0;
}
.tab .nav-tabs li a:hover,
.tab .nav-tabs li.active a {
    color: #222;
    background: #fff;
    border: none;
}
.tab .nav-tabs li.active a {
    color: #6cbf1c;
}
.tab .nav-tabs li a:before,
.tab .nav-tabs li a:after {
    content: "";
    background-color: #d1d1d1;
    height: 7px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.5s ease 0s;
}
.tab .nav-tabs li a:after {
    background-color: #6cbf1c;
    height: 100%;
    opacity: 0;
}
.tab .nav-tabs li.active a:before,
.tab .nav-tabs li a:hover:before {
    height: 100%;
    opacity: 0;
}
.tab .nav-tabs li.active a:after,
.tab .nav-tabs li a:hover:after {
    height: 7px;
    opacity: 1;
}
.tab .tab-content {
    color: #555;
    background: #fff;
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 23px;
    padding: 20px;
}
.tab .tab-content h3 {
    color: #222;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 7px 0;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li {
        width: 100%;
    }
    .tab .nav-tabs li a {
        margin: 0 0 10px;
    }
    .tab .tab-content h3 {
        font-size: 18px;
    }
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style>
body {
    margin: 20px;
}
a:hover,
a:focus {
    text-decoration: none;
    outline: none;
}
.tab {
    font-family: "Nunito", sans-serif;
}
.tab .nav-tabs {
    background-color: transparent;
    border: none;
}
.tab .nav-tabs li a {
    color: #222;
    background: transparent;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    padding: 15px 15px 10px;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li:last-child a {
    margin-right: 0;
}
.tab .nav-tabs li a:hover,
.tab .nav-tabs li.active a {
    color: #222;
    background: #fff;
    border: none;
}
.tab .nav-tabs li.active a {
    color: #6cbf1c;
}
.tab .nav-tabs li a:before,
.tab .nav-tabs li a:after {
    content: "";
    background-color: #d1d1d1;
    height: 7px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.5s ease 0s;
}
.tab .nav-tabs li a:after {
    background-color: #6cbf1c;
    height: 100%;
    opacity: 0;
}
.tab .nav-tabs li.active a:before,
.tab .nav-tabs li a:hover:before {
    height: 100%;
    opacity: 0;
}
.tab .nav-tabs li.active a:after,
.tab .nav-tabs li a:hover:after {
    height: 7px;
    opacity: 1;
}
.tab .tab-content {
    color: #555;
    background: #fff;
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 23px;
    padding: 20px;
}
.tab .tab-content h3 {
    color: #222;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 7px 0;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li {
        width: 100%;
    }
    .tab .nav-tabs li a {
        margin: 0 0 10px;
    }
    .tab .tab-content h3 {
        font-size: 18px;
    }
}
</style>

</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-offset-3 col-md-6">
            <div class="tab" role="tabpanel">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#Section1" aria-controls="home" role="tab" data-toggle="tab">Section 1</a></li>
                    <li role="presentation"><a href="#Section2" aria-controls="profile" role="tab" data-toggle="tab">Section 2</a></li>
                    <li role="presentation"><a href="#Section3" aria-controls="messages" role="tab" data-toggle="tab">Section 3</a></li>
                </ul>
                <!-- Tab panes -->
                <div class="tab-content tabs">
                    <div role="tabpanel" class="tab-pane fade in active" id="Section1">
                        <h3>Section 1</h3>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper, magna a ultricies volutpat, mi eros viverra massa, vitae consequat nisi justo in tortor. Proin accumsan felis ac felis dapibus, non iaculis
                            mi varius.
                        </p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section2">
                        <h3>Section 2</h3>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper, magna a ultricies volutpat, mi eros viverra massa, vitae consequat nisi justo in tortor. Proin accumsan felis ac felis dapibus, non iaculis
                            mi varius.
                        </p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section3">
                        <h3>Section 3</h3>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce semper, magna a ultricies volutpat, mi eros viverra massa, vitae consequat nisi justo in tortor. Proin accumsan felis ac felis dapibus, non iaculis
                            mi varius.
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>

</body>
</html>
Preview