Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-10-2015, 07:40 PM   #1
altmman
Confirmed User
 
Industry Role:
Join Date: Jan 2015
Location: usa
Posts: 468
Anyone know CSS? How can I do a navbar like this?

Hi I saw this navbar on CNN CNNMoney - Business, financial and personal finance news
And when you scroll down the logo shrinks. I really like this. Is there a tutorial on how to do this?
altmman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-10-2015, 09:16 PM   #2
chloelewis
Confirmed User
 
chloelewis's Avatar
 
Industry Role:
Join Date: Nov 2014
Location: Montreal
Posts: 101
1. Listen to the page scroll event with JavaScript
2. To know how many pixel the page scrolled down, you can look at this attribute document.documentElement.scrollTop
3. When it scrolled enough to your liking, then you can add a class to your header element with a CSS transform example: myHeader.classList.add('scaledown')

Here with the steps
and a demo
__________________
Find me on Twitter and LinkedIn | Who am I? Long read (en Francais ici)
chloelewis is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
logo, navbar, scroll, shrinks, tutorial, css



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.