Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
nicholas maddren
12,793 PointsHow would I go by achieving this effect?
If you look at:
You will notice when you scroll down the page that a JS event is triggered and a home button will fade in and push the other links to the right or it could be a CSS transition I am unsure. However if you take a look here at my example:
I have managed to get it pretty much the same however I don't have a clue how I could possibly get those <li> elements to start on top of the home button/logo and pushes out to the right. I am using bootstrap so I think affix might be a good place to start however I don't have a clue.
Any tips would be awesome thanks!
2 Answers
Florian Goussin
8,925 PointsI think you should use display: none; instead of opacity: 0;
And then:
nav.affix .navbar-brand {
display: inline-block;
}
Gwenaël Magnenat
14,617 PointsBy inspecting the code, you can see they use display: none on the list item containing the home button.
When you scroll down they use display: list-item and a smooth transition that you can probably do using css3 or javascript