$(document).height()与$(window).height()区别
来源:互联网 发布:什么安装摄像头软件 编辑:程序博客网 时间:2024/05/16 10:13
1.$(document).height()代表整个文档(页面)的高度
$(window).height()则代表当前可见区域的大小
所以当浏览器窗口大小发生变化时,$(document).height()值不变,$(window).height()发生变化
2.$(document).scrollTop() 获取垂直滚动的距离 即当前滚动的地方的窗口顶端到整个页面顶端的距离
$(document).scrollLeft() 获取水平滚动条的距离
当scrollTop()==0的时,滚动条到达顶端
当scrollTop()>=$(document).height()-$(window).height()时,滚动条到达底端
注:$(document).scrollTop()与$(window).scrollTop()效果相同,但$(window).scrollTop()被所有浏览器支持
阅读全文
0 0
- $(document).height()与$(window).height()的区别
- $(document).height()与$(window).height()区别
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- $(document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- $(window).height()与$(document).height()
- $(document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- $(document).height()和$(window).height()区别
- $(window).height() 和 $(document).height()的区别
- 敏捷开发项目管理流程
- 【很多爸爸不是没时间陪小孩,而是…
- getElementsByClassName();
- 【现状不只一个,选择「最有价值的…
- 【成功关键!5小时法则】成功绝非…
- $(document).height()与$(window).height()区别
- weblogic 配置informax数据源
- 【让自己一个消失】「你找我的多寡…
- 【故事:要怎样才能快乐?】正在玩…
- Java8 新特新对Lambda的支持 简单入门1
- 【提供帮助之前,先打开耳朵聆听需…
- 【爱情裡的「另一半」,是为了要完…
- 【撕下几页错写的青春,兑换彼此更…
- 【女人在爱裡要懂得保护自己!三个…