你好我最初有4个部分我设置了第一个div位置固定 在这里重置div位置绝对是我的代码:
<section id="intro" class="main style1 dark full screen" style="position: fixed; top: 0px; height: 677px;">
<div class="content container small">
something goes here
</div>
</section>
<section id="one" class="main style2 right dark fullscreen" style="position: absolute; top: 4000px; height: 677px;">
<div class="content box style2">
Something goes here
</div>
</section>
<section id="two" class="main style2 left dark fullscreen" style="position: absolute; top: 6700px;">
<div class="content box style2">
Something goes here
</div>
</section>
<section id="work" class="main style3 primary" style="position: absolute; top: 7184px;">
<div class="content container">
Something goes here
</div>
</section>
<section id="contact" class="main style3 secondary" style="position: absolute; top: 10184px;">
<div class="content container">
Something goes here
</div>
</section>
其实我想当我滚动页面时第二部分到达顶部:0位置应该是固定的,其余部分位置应该是绝对的,实际上我正在创建视差滚动滚动效果。
提前致谢。
这是我的Fiddle