content logo

Bootstrap Tabs:

Gradient Bootstrap Tabs with Animation

The gradient is the inclining deviates from the horizontal and has a beautiful style. You can use it for your website and make it more attractive than before. In this post, we are going to introduce you to one of the most functional bootstraps with the name Gradient Bootstrap Tabs with Animation. These Gradient Bootstrap Tabs have a white background and the writings are black with a shadow. The main role of these tabs is their categorization. You can classify much information in some small pages. This helps readers and visitors not to be confused and attracted to your website.

At first, each section of this code has a white background, but after moving the mouse or clicking on a section, the Bootstrap Tabs Animation will appear beautifully. This design will appear with a shadow and from the middle of the page. The color of these Animating Tabs on Hover is between blue and purple which is so pretty and eye-catching. At first that you did not click on a section, the writing is black and after clicking on it, it will turn to white. This allows the bootstrap to be more attractive and people like to use these Bootsrap Pure CSS Tabs more.

#

Gradient Bootstrap Tabs

#

Bootstrap Tabs Animation

#

Animating Tabs on Hover

#

Bootsrap Pure CSS 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">
                        <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">
                        <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">
                        <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: #fff;
    padding: 0 0 1px;
    margin: 0 0 10px;
    border: none;
    border-radius: 30px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
}
.tab .nav-tabs li a {
    color: #555;
    background: #fff;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 20px 6px;
    margin: 0 5px 0 0;
    border: none;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease 0.3s;
}
.tab .nav-tabs li.active a,
.tab .nav-tabs li a:hover,
.tab .nav-tabs li.active a:hover {
    color: #fff;
    background: #fff;
    border: none;
}
.tab .nav-tabs li a:before,
.tab .nav-tabs li a:after {
    content: "";
    background-color: #1890e0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    opacity: 0.5;
    transform: scaleX(0);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.4s ease 0s;
}
.tab .nav-tabs li a:after {
    background-color: #7a10eb;
    transform: scaleX(0);
    transition: all 0.4s ease 0.2s;
}
.tab .nav-tabs li.active a:before,
.tab .nav-tabs li a:hover:before {
    opacity: 0;
    transform: scaleX(1);
}
.tab .nav-tabs li.active a:after,
.tab .nav-tabs li a:hover:after {
    opacity: 1;
    transform: scaleX(1);
    background: linear-gradient(to right, #1890e0, #7a10eb);
}
.tab .tab-content {
    color: #999;
    background-color: #fff;
    font-size: 17px;
    letter-spacing: 1px;
    line-height: 30px;
    padding: 20px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    position: relative;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs {
        padding: 0;
        border-radius: 20px;
    }
    .tab .nav-tabs li {
        width: 100%;
        text-align: center;
        margin: 0 0 5px;
    }
    .tab .nav-tabs li:last-child {
        margin-bottom: 0;
    }
    .tab .nav-tabs li a {
        margin: 0;
    }
}
<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: #fff;
    padding: 0 0 1px;
    margin: 0 0 10px;
    border: none;
    border-radius: 30px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
}
.tab .nav-tabs li a {
    color: #555;
    background: #fff;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 20px 6px;
    margin: 0 5px 0 0;
    border: none;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease 0.3s;
}
.tab .nav-tabs li.active a,
.tab .nav-tabs li a:hover,
.tab .nav-tabs li.active a:hover {
    color: #fff;
    background: #fff;
    border: none;
}
.tab .nav-tabs li a:before,
.tab .nav-tabs li a:after {
    content: "";
    background-color: #1890e0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    opacity: 0.5;
    transform: scaleX(0);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all 0.4s ease 0s;
}
.tab .nav-tabs li a:after {
    background-color: #7a10eb;
    transform: scaleX(0);
    transition: all 0.4s ease 0.2s;
}
.tab .nav-tabs li.active a:before,
.tab .nav-tabs li a:hover:before {
    opacity: 0;
    transform: scaleX(1);
}
.tab .nav-tabs li.active a:after,
.tab .nav-tabs li a:hover:after {
    opacity: 1;
    transform: scaleX(1);
    background: linear-gradient(to right, #1890e0, #7a10eb);
}
.tab .tab-content {
    color: #999;
    background-color: #fff;
    font-size: 17px;
    letter-spacing: 1px;
    line-height: 30px;
    padding: 20px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    position: relative;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs {
        padding: 0;
        border-radius: 20px;
    }
    .tab .nav-tabs li {
        width: 100%;
        text-align: center;
        margin: 0 0 5px;
    }
    .tab .nav-tabs li:last-child {
        margin-bottom: 0;
    }
    .tab .nav-tabs li a {
        margin: 0;
    }
}
</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">
                        <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">
                        <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">
                        <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