content logo

Bootstrap Headers:

Bootstrap Multicolor Rainbow Header

Colour scheme is such an important aspect of a website. By colour scheme, we don’t mean just the background colour of your site or the colour you chose for your logo. In fact, in involves every colour that appears in your website. It could be the homepage, the login form, sidebars and even headers. The fonts and buttons count as the main theme of your website as well. This colour has a significant impact on your users’ perception of your brand. colours could induct many different feelings in a person. Due to this fact, the colour you choose for your website can be a key factor in deciding if a person wants to explore your website or they wish to leave it as soon as possible.

This is obvious that no one wants to spend too much time in an ugly website. The most effective way to improve the aesthetic of your site is to choose the right colours for it. with that said, today, we are sharing a special colourful header with you. This is a fixed Bootstrap navbar at the top of the screen. The unique rainbow colour design of this Bootstrap menu makes it so pleasing to the eye. This is truly a must have Bootstrap colourful navbar for every website.

#

Bootstrap Navbar

#

Colorful Header

#

Bootstrap Colorful Navbar

#

Bootstrap Menu

<!-- This script got from frontendfreecode.com -->
<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item active"><a class="nav-link" href="#">Home</a></li>
            <li class="nav-item"><a class="nav-link" href="#about">About</a></li>
            <li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
            <li class="nav-item dropdown">
                <a href="#" id="dropdown1" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                <ul class="dropdown-menu" aria-labelledby="dropdown1">
                    <li class="dropdown-item"><a href="#">Action</a></li>
                    <li class="dropdown-item"><a href="#">Another action</a></li>
                    <li class="dropdown-item"><a href="#">Something else here</a></li>
                    <li role="separator" class="divider"></li>
                    <li class="dropdown-header">Nav header</li>
                    <li class="dropdown-item"><a href="#">Separated link</a></li>
                    <li class="dropdown-item"><a href="#">One more separated link</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!--/.nav-collapse -->
</nav>
<div class="container jumbo">
    <!-- Main component for a primary marketing message or call to action -->
    <div class="jumbotron">
        <h1>Bootstrap 4 Animated Navbar Rainbow Color</h1>
        <p>This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.</p>
    </div>
</div> <!-- /container --><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
}
.jumbo {
  padding-top: 150px;
  height: 200vh;
}
.navbar a {
  color: #131313;
}
.navbar li > a.nav-link {
  padding-left: 15px;
  padding-right: 15px;
}
.navbar li.nav-item {
  border-radius: 5px;
}
.navbar li.active {
  background: #ff9900;
}
.navbar li.active a {
  color: #fafafa;
}
.navbar .navbar-toggler {
  border: none;
}
.shrink .navbar-toggle .icon-bar {
  background: #fafafa;
}
.rainbow {
  background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
  background-size: 1800% 1800%;
  -webkit-animation: rainbow 18s ease infinite;
  -z-animation: rainbow 18s ease infinite;
  animation: rainbow 18s ease infinite;
}
@-webkit-keyframes rainbow {
  0% {
    background-position: 0% 82%;
  }
  50% {
    background-position: 100% 19%;
  }
  100% {
    background-position: 0% 82%;
  }
}
@keyframes rainbow {
  0% {
    background-position: 0% 82%;
  }
  50% {
    background-position: 100% 19%;
  }
  100% {
    background-position: 0% 82%;
  }
}
jQuery(document).ready(function ($) {
    $(window).scroll(function () {
        if ($(document).scrollTop() > 150) {
            // Navigation Bar
            $('.navbar').removeClass('fadeIn');
            $('body').addClass('shrink');
            $('.navbar').addClass('rainbow');
            $('.navbar').addClass('animate__animated animate__fadeInDown');
        } else {
            $('.navbar').removeClass('animate__fadeInDown');
            $('body').removeClass('shrink');
            $('.navbar').removeClass('rainbow');
            $('.navbar').addClass('animate__animated animate__fadeIn');
        }
    });
});
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.3/js/bootstrap.min.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.3/js/bootstrap.min.js'></script>
<style>
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
}
.jumbo {
  padding-top: 150px;
  height: 200vh;
}
.navbar a {
  color: #131313;
}
.navbar li > a.nav-link {
  padding-left: 15px;
  padding-right: 15px;
}
.navbar li.nav-item {
  border-radius: 5px;
}
.navbar li.active {
  background: #ff9900;
}
.navbar li.active a {
  color: #fafafa;
}
.navbar .navbar-toggler {
  border: none;
}
.shrink .navbar-toggle .icon-bar {
  background: #fafafa;
}
.rainbow {
  background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
  background-size: 1800% 1800%;
  -webkit-animation: rainbow 18s ease infinite;
  -z-animation: rainbow 18s ease infinite;
  animation: rainbow 18s ease infinite;
}
@-webkit-keyframes rainbow {
  0% {
    background-position: 0% 82%;
  }
  50% {
    background-position: 100% 19%;
  }
  100% {
    background-position: 0% 82%;
  }
}
@keyframes rainbow {
  0% {
    background-position: 0% 82%;
  }
  50% {
    background-position: 100% 19%;
  }
  100% {
    background-position: 0% 82%;
  }
}
</style>

</head>
<body>
<nav class="navbar navbar-expand-md navbar-light fixed-top bg-light">
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item active"><a class="nav-link" href="#">Home</a></li>
            <li class="nav-item"><a class="nav-link" href="#about">About</a></li>
            <li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
            <li class="nav-item dropdown">
                <a href="#" id="dropdown1" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
                <ul class="dropdown-menu" aria-labelledby="dropdown1">
                    <li class="dropdown-item"><a href="#">Action</a></li>
                    <li class="dropdown-item"><a href="#">Another action</a></li>
                    <li class="dropdown-item"><a href="#">Something else here</a></li>
                    <li role="separator" class="divider"></li>
                    <li class="dropdown-header">Nav header</li>
                    <li class="dropdown-item"><a href="#">Separated link</a></li>
                    <li class="dropdown-item"><a href="#">One more separated link</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!--/.nav-collapse -->
</nav>
<div class="container jumbo">
    <!-- Main component for a primary marketing message or call to action -->
    <div class="jumbotron">
        <h1>Bootstrap 4 Animated Navbar Rainbow Color</h1>
        <p>This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.</p>
    </div>
</div> <!-- /container --><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
jQuery(document).ready(function ($) {
    $(window).scroll(function () {
        if ($(document).scrollTop() > 150) {
            // Navigation Bar
            $('.navbar').removeClass('fadeIn');
            $('body').addClass('shrink');
            $('.navbar').addClass('rainbow');
            $('.navbar').addClass('animate__animated animate__fadeInDown');
        } else {
            $('.navbar').removeClass('animate__fadeInDown');
            $('body').removeClass('shrink');
            $('.navbar').removeClass('rainbow');
            $('.navbar').addClass('animate__animated animate__fadeIn');
        }
    });
});
</script>

</body>
<script>'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),_trfd.push({'tccl.baseHost':'secureserver.net'},{'ap':'cpbh-mt'},{'server':'p3plmcpnl484880'},{'dcenter':'p3'},{'cp_id':'765442'},{'cp_cl':'8'}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.</script><script src='https://img1.wsimg.com/traffic-assets/js/tccl.min.js'></script></html>
Preview