在pagescroll上滚动div [英] Scroll divs over each other on pagescroll

查看:129
本文介绍了在pagescroll上滚动div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有几个DIV的HTML页面和一个名为'fullscreenCSS'的函数,这个函数负责处理全屏DIV。

当我使用滚动条滚动时,我希望当前的DIV保持在它的位置(如果滚动到该DIV的末尾),并且下一个DIV滑过它。我认为目前的DIV暂时有一个'绝对'或'固定'的位置,直到下一个达到屏幕的顶部。有没有人有想法如何做到这一点?



第一次尝试可以看到: http://www.84media.nl/project/couch/

解决方案

这看起来如何?



http:// jsfiddle .net / Tgm6Y / 2227 /

I have a HTML-page with several DIVs and a function named 'fullscreenCSS' wich takes care of the DIVs being fullscreen.

When I scroll using the scrollbar, I want the current DIV to stay at its position (if scrolled to the end of that DIV) and the next one slides over it. I think the current DIV temporarily got to have a position 'absolute' or 'fixed' untill the next one has reached the top of the screen. Does anybody have an idea how to do this?

A first attempt can be seen on: http://www.84media.nl/project/couch/

解决方案

How's this look?

http://jsfiddle.net/Tgm6Y/2227/

这篇关于在pagescroll上滚动div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆