Solved

Fade in/out Twitter Bootstrap navbar links

Posted on 2013-06-12
1
1,804 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
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…

626 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