jquery - How to add a hovering effect to my navbar -


my navbar not show hovering effect. have added following css code doesn't work.

container a:hover {   color: #555;   z-index: -10;   animation: fill 1s forwards;   -webkit-animation: fill 1s forwards;   -moz-animation: fill 1s forwards;   opacity: 1; } 

what should do?

here css/html code:

.container {    overflow: hidden;    background-color: #ffffff;    font-family: arial;    top:0;    left:0;    padding: 5px;   }    .container {    float: left;    font-size: 16px;    color: black;    text-align: center;    padding: 14px 16px;    text-decoration: none;  }
<div class="whole-div">    <div class="container">      <body data-spy="scroll" data-target=".navbar" data-offset="50">      <div>        <div class="collapse navbar-collapse" id="mynavbar">          <ul class="nav navbar-nav">            <a href="#section1">toehold switch</a>            <a href="#section2">interlab</a>            <a href="#section3">charaterization</a>            <a href="#section4">program</a>          </ul>      </div>    </div>    </div>  </div>

you forgot period in class declaration. when add period it, looks works fine. try out , let me know happens.

.container a:hover {    color: #555;    z-index: -10;    animation: fill 1s forwards;    -webkit-animation: fill 1s forwards;    -moz-animation: fill 1s forwards;    opacity: 1;  }    .container {    overflow: hidden;    background-color: #ffffff;    font-family: arial;    top:0;    left:0;    padding: 5px;   }    .container {    float: left;    font-size: 16px;    color: black;    text-align: center;    padding: 14px 16px;    text-decoration: none;  }
<div class="whole-div">    <div class="container">      <body data-spy="scroll" data-target=".navbar" data-offset="50">      <div>        <div class="collapse navbar-collapse" id="mynavbar">          <ul class="nav navbar-nav">            <a href="#section1">toehold switch</a>            <a href="#section2">interlab</a>            <a href="#section3">charaterization</a>            <a href="#section4">program</a>          </ul>      </div>    </div>    </div>  </div>


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -