My HTML code look like this:
<div id="a" class="panels">FIXED PANEL</div>
<div id="b" class="panels">Scrolling-Panel 1</div>
<div id="c" class="panels">Scrolling-Panel 2</div>
<div id="d" class="panels">Scrolling-Panel 3</div>
I want the second <div>
b
to appear on top of the <div>
a
, and the <div>
with id
d
to appear on top of <div>
c
. The two divisions are the same size, I tried to add position:fixed
and top:0
in the first <div>
id
but I don't get the effect I want, the first <div>
is repeated every time a <div>
goes on top. I know that this issue comes from position:fixed
and I don't know how to fix it(to make the first <div>
don't repeat after every scroll but to get the parallax effect for all divisions).
I made a demo with my issue: http://jsfiddle.net/1g8sLnfk/5/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…