方法1: <div class="footer"></div> .footer{ position:fixed; bottom:0; left:0; width:100%; _position:absolute; _top:expression(documentElement.scrollTop +
分类:
其他好文 时间:
2016-02-05 18:50:23
阅读次数:
209
关于css定位fixed定位不兼容ie6,ie7的解决方案 /距离上边为0/ .sl-fixed-top{ bottom:auto; top:0; _bottom:auto; _top:expression(eval(document.documentElement.scrollTop)) } /距
分类:
Web程序 时间:
2016-02-04 18:42:30
阅读次数:
236
代码1: $("#back-to-top").click(function () { $('body,html').animate({ scrollTop: 0 }, 1000); return false; }); 代码2: <!DOCTYPE html> <html> <head lang="e
分类:
其他好文 时间:
2016-02-02 20:39:30
阅读次数:
191
document.body.clientHeight: IE、chrome、firefox: body对象高度(height+padding),body的默认高度为0 document.body.clientWidth: IE、chrome、firefox body对象的宽度(width+paddi
分类:
编程语言 时间:
2016-01-30 02:15:31
阅读次数:
299
// 滑动分页 $(window).scroll(function() { var mayLoadContent = $(window).scrollTop() >= $(document).height() - $(window).height(); var docHeight = $(docum
分类:
移动开发 时间:
2016-01-29 11:34:04
阅读次数:
245
返回顶部使用JQuery的animate和scrollTop方法可以创建简单地返回顶部的动画:// Back to top$('a.top').click(function (e) { e.preventDefault(); $(document.body).animate({scrollTop.....
分类:
Web程序 时间:
2016-01-26 10:28:11
阅读次数:
167
1.返回顶部按钮你可以利用 animate 和 scrollTop 来实现返回顶部的动画,而不需要使用其他插件。// Back to top// Back to top$('a.top').click(function () { $(document.body).animate({scrollTo....
分类:
Web程序 时间:
2016-01-23 10:30:01
阅读次数:
185
// 未实现功能的代码 1(自己写的代码) var _cur_top = $(window).scrollTop(); var num = $(".class_section").length; var wH = $(window).height...
分类:
Web程序 时间:
2016-01-19 10:30:12
阅读次数:
116
单纯判断滚动条方向function scroll( fn ) { var beforeScrollTop = document.body.scrollTop, fn = fn || function() {}; window.addEventListener("scroll...
分类:
Web程序 时间:
2016-01-18 17:17:39
阅读次数:
1509
$('#up').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);});
分类:
其他好文 时间:
2016-01-16 11:57:55
阅读次数:
148