View Single Post
Old 02-10-2015, 09:16 PM  
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