有没有方法可以获得可视区上面跟下面的高度啊? 这个是获得可视区的高度$(window).height();,当滚动条滚动到中间,怎么获得可视区上边跟下边的大小啊? 是跟滚动条的位置有关吗?
[quote=引用 2 楼 pad1614 的回复:] [quote=引用 1 楼 slwsss 的回复:] <div style="width: 100px;height: 100px;margin: -50px 0 0 -50px;background: #F00;position: fixed;top: 50%;left: 50%;"></div>
<div style="width: 100px;height: 100px;margin: -50px 0 0 -50px;background: #F00;position: fixed;top: 50%;left: 50%;"></div>
[quote=引用 1 楼 slwsss 的回复:] <div style="width: 100px;height: 100px;margin: -50px 0 0 -50px;background: #F00;position: fixed;top: 50%;left: 50%;"></div>
87,984
社区成员
224,681
社区内容
加载中
试试用AI创作助手写篇文章吧