Solved

Fade in/out Twitter Bootstrap navbar links

Posted on 2013-06-12
1
1,680 Views
Last Modified: 2013-06-16
Hi

I have a Twitter Bootstrap navbar in place with rollover background color change on the links - all good.

I'd like the rollover background color to fade in on rollover and fade out on rollout. (Instead of the default instant change to the background color on rollover/out.)  What's the best way to achieve this?

Thanks!
0
Comment
Question by:Danzigger
1 Comment
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39244760
In the stylesheet add a rule that targets the elements of the navbar with a class:

.nav-fade li {
   background: #fff;
   padding: 3px 8px;
   display: inline-block;
   -moz-transition: background 1s ease-in-out;
   -webkit-transition: background s ease-in-out;
    transition: background 1s ease-in-out;
   }

   .nav-fade li:hover {
      background: #ddd;
      }

Open in new window


Cd&
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now