我有一个类似于以下模型的 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) |
| |
| |
| |
| |
| |
____________________________________________________