HTML精确定位:scrollLeft,scrollWidth,clientWidth,offsetWidth scrollHeight: 获取对象的滚动高度。 scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离 scrollTop:设置或获取位于对象最顶端和窗口中 ...
分类:
其他好文 时间:
2016-11-02 17:53:17
阅读次数:
220
$(document).scroll(function(){ var scrollTop = $(document).scrollTop(),bodyHeight = $(window).height(); if(scrollTop > bodyHeight){ $(".toTop").show() ...
分类:
其他好文 时间:
2016-11-01 19:13:24
阅读次数:
128
1.css3 动画:通过设置图片的opacity 来到hover时的动画: 2.返回顶部代码: scrollTop([val]) css 概述 获取匹配元素相对滚动条顶部的偏移。 此方法对可见和隐藏元素均有效。 获取匹配元素相对滚动条顶部的偏移。 此方法对可见和隐藏元素均有效。 此方法对可见和隐藏元 ...
分类:
其他好文 时间:
2016-10-24 17:43:31
阅读次数:
201
可视区尺寸 document.documentElement.clientWidth document.documentElement.clientHeight 滚动距离 document.body.scrollTop/scrollLeft document.documentElement.scro ...
分类:
Web程序 时间:
2016-10-24 02:27:03
阅读次数:
291
console.log(document.body.scrollTop);滑动距顶部距离 console.log(document.documentElement.scrollTop); console.log(document.body.scrollHeight);文档高度,包括可滑动的部分 co ...
分类:
其他好文 时间:
2016-10-21 19:16:06
阅读次数:
101
好好看看下面那张图,基本上就没啥问题了! scrollHeight: 获取对象的滚动高度。 scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离 scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离 scrollWidth:获取对象的滚动宽度 ...
分类:
其他好文 时间:
2016-10-17 20:38:03
阅读次数:
166
$(function(){ $(window).scroll(function(){ if($(window).scrollTop()>100){ $("#back-to-top").fadeIn(1000); } else{ $("#back-to-top").fadeOut(1000); } } ...
分类:
其他好文 时间:
2016-10-13 09:35:45
阅读次数:
93
var stop=true;$(window).scroll(function(){ totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); if($(document).height() < ...
分类:
Web程序 时间:
2016-10-12 19:24:13
阅读次数:
234
之前在修改IE6下的一个显示bug时,查到过这些,贴这备忘,后面给出了详细说明,以前的版本,没仔细的说明,特希望大家也收藏下。 网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: docume ...
分类:
Web程序 时间:
2016-10-12 16:50:17
阅读次数:
155
Offset 自己的 偏移 scroll 滚动的 scrollTop scrollLeft scrollTop 被卷去的头部 它就是当你滑动滚轮浏览网页的时候网页隐藏在屏幕上方的距离 怎么得到scrollTop 页面滚动效果 window.onscroll = function() { 页面滚动语句 ...
分类:
其他好文 时间:
2016-10-05 15:31:45
阅读次数:
102