javascript - CSS/JS content scroll UP instead of down -


i'm building site navigation bar stretching across entire site , it's fixed. under navigation bar there image, background image, set cover. , under image main content.

when scroll down, navigation bar covers image top bottom , main content visible, scrolling in downwards fashion. "reverse" it. navigation still fixed cover image under time, when scroll down main content comes , covers image bottom top. when scroll down, main content scrolls up.

let's image has 1 @ top , 2 @ bottom. so, when scroll down navigation bar covers image top bottom 1 disappear , 2 visible until covered. effect i'm looking make 2 disappear , 1 remain in same place until covered main content.

i looked parallax i'm not sure if that's right thing go with. , have no idea how achieve effect.

hopefully you'll understand i'm trying here. if need more info let me know.

thanks in advance.

edit

the effect can seen on abduzeedo frontpage

you need image "attached" background ? if so, cannot fix background ?

body {     background-attachment:fixed; } 

source: http://www.w3schools.com/cssref/pr_background-attachment.asp https://developer.mozilla.org/en-us/docs/web/css/background-attachment

note: careful using w3schools, information incorrect, see here.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -