That is called an animation.
Try this:
.navbar {
-webkit-animation-name: changeColorAnim;
animation-name: changeColorAnim;
-webkit-animation-duration: 90s;
animation-duration: 90s;
animation-iteration-count: infinite;
}
@-webkit-keyframes changeColorAnim {
0% { background-color: black }
50% { background-color: white }
100% { background-color: black }
}
@keyframes changeColorAnim {
0% { background-color: black }
50% { background-color: white }
100% { background-color: black }
}
If you want it to not change gradually then put inside of the @keyframes something like this:
49% { background-color: black }
And change it to the color at 0% and also you can put that for 99% and keep 99% at the same color as 50%. This keeps it the same color until 1% before and then it will change during that 1% instead of that 50% range.