content logo

Bootstrap Tabs:

Bootstrap Tabs with Animating Underline

Tabs are one of the most crucial elements in the success of a website. If you choose a good tab, you can make sure that your website will be successful. In this post, we have provided Bootstrap Tabs with Animating Underline for you. This bootstrap is so functional with a great design. As you can see here, these Graphical Bootstrap Tabs have a simple font. But there is something that makes this tab different from other ones. There is one line under each section with a gray color. You can use these Bootstrap Underline Tabs to organize your website; it means that this helps you to classify all information into different categories. This helps visitors to attract and stay on your website.

As you can see in this post, the background of these section tabs is white and its writings are black. But the detailed part has a dark gray background and the writings are white. This makes harmony in these parts and makes them more beautiful. At first, you cannot see the line under the sections. But after you select one, a dark gray line will smoothly appear. These Bootstrap Animating Tabs are designed from left to right. You can download and use this CSS Underline Effect easily.

#

Bootstrap Underline Tabs

#

CSS Underline Effect

#

Bootstrap Animating Tabs

#

Graphical Bootstrap 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 .nav-tabs {
    border: none;
    margin: 0;
}
.tab .nav-tabs li a {
    padding: 10px;
    margin-right: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #293241;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    background: transparent;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li a:hover,
.tab .nav-tabs li.active a {
    border: none;
}
.tab .nav-tabs li a:before {
    content: "";
    width: 100%;
    height: 4px;
    background: #f6f6f6;
    border: 1px solid #e9e9e9;
    border-radius: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
}
.tab .nav-tabs li a:after {
    content: "";
    width: 0;
    height: 4px;
    background: #727cb6;
    border: 1px solid #727cb6;
    border-radius: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
    transition: all 1s ease 0s;
}
.tab .nav-tabs li:hover a:after,
.tab .nav-tabs li.active a:after {
    width: 100%;
    opacity: 1;
}
.tab .tab-content {
    padding: 15px 20px;
    margin-top: 20px;
    font-size: 17px;
    color: #fff;
    letter-spacing: 1px;
    line-height: 30px;
    background: #727cb6;
    position: relative;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    .tab .tab-content {
        margin-top: 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 .nav-tabs {
    border: none;
    margin: 0;
}
.tab .nav-tabs li a {
    padding: 10px;
    margin-right: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #293241;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    background: transparent;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li a:hover,
.tab .nav-tabs li.active a {
    border: none;
}
.tab .nav-tabs li a:before {
    content: "";
    width: 100%;
    height: 4px;
    background: #f6f6f6;
    border: 1px solid #e9e9e9;
    border-radius: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
}
.tab .nav-tabs li a:after {
    content: "";
    width: 0;
    height: 4px;
    background: #727cb6;
    border: 1px solid #727cb6;
    border-radius: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
    transition: all 1s ease 0s;
}
.tab .nav-tabs li:hover a:after,
.tab .nav-tabs li.active a:after {
    width: 100%;
    opacity: 1;
}
.tab .tab-content {
    padding: 15px 20px;
    margin-top: 20px;
    font-size: 17px;
    color: #fff;
    letter-spacing: 1px;
    line-height: 30px;
    background: #727cb6;
    position: relative;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    .tab .tab-content {
        margin-top: 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">
                        <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