javascript - Change color by scrolling -


this example seems change red color blue bottom. but, want change red color blue top position scrolling. show me solution? it's okay if there using javascript.
here example want to. when scroll down @ site, gray line change red.

<div id="scroll1"></div> <div id="scroll2"></div> 

css part

#scroll1 {    background-color: red;    width: 50px;    height: 800px; } #scroll2 {   bacground-color: blue;   width: 50px;   height: 800px; } 

#scroll1{    background-color:blue;    width: 50px;    height:800px  } #scroll2{    background-color:red;    width: 50px;    height:800px  } 

according approach used in example, can done css. replace color.


Comments

Popular posts from this blog

Admob integration with pygame in android -

mod rewrite - Using "?" when rewriting the URL -

installer - what is Hex representation of MSIUSEREALADMINDETECTION? -