Hi, so I have developed a top fixed navigation bar at the top of a webpage. How do I incorporate a fading navigation bar so that when I scroll down, the fixed bar turns from black to a certain opacity level? Is that something incorporating jquery? And if possible, if I hover over the bar, can it turn back to black?
An example would be like this http://tympanus.net/Tutorials/FixedFadeOutMenu/ but I believe he uses background images? And I am also kind of talking about what the Daniweb's navigation bar is doing, except my navigation is fixed at the top in the beginning.
Here is my code.
HTML
<div class="nav">
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#about">About Me</a></li>
<li><a href="#work">Work</a></li>
<li><a href="#courses">Courses</a></li>
</ul>
</div>
CSS
.nav
{
background-color: #000000;
text-align: center;
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 10000;
cursor: default;
font-family: Helvetica, sans-serif;
}
.nav ul
{
margin: 0;
}
.nav li
{
display: inline-block;
line-height: 1.5px;
margin: 20px 40px 20px 40px;
}
.nav a
{
position: relative;
display: block;
color: #fff;
text-decoration: none;
outline: 0;
font-size: 18px;
}`
Can anyone help me out here? Thank you in advance!