【发布时间】:2013-03-28 14:48:39
【问题描述】:
我有一个类似下面模型的html页面,
当用户滚动页面时,如何计算#page1可见部分的高度?
-------------------------------------------------------
#heder (position: fixed; height: 100px, z-index: 10)
-------------------------------------------------------
visible zone
____________________________________________________
| |
| #page1 (visible) |
| |
| (position: static; height: 1000px, z-Index: 0) |
| |
-------------------------------------------------------
#footer (position: fixed; height: 50px, z-index: 10)
-------------------------------------------------------
| |
| |
| |
| |
| #page1 (invisible) |
| |
| |
| |
| |
____________________________________________________
| |
| |
| |
| #page2 (invisible) |
| |
| (position: static; height: 700px, z-Index: 0) |
| |
| |
| |
| |
| |
____________________________________________________
【问题讨论】:
-
我想这有你要找的东西:stackoverflow.com/questions/12868287/…
标签: javascript jquery html css