Solved

Fade in/out Twitter Bootstrap navbar links

Posted on 2013-06-12
1
1,655 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Read about why website design really matters in today's demanding market.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

746 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

10 Experts available now in Live!

Get 1:1 Help Now