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
Post a Comment