// 监听滚动条 获取指定元素到可视区域顶部的距离$(window).scroll(function(){var box=document.getElementById('scroll');console.log(box.getBoundingClientRect().top)})
700字范文,内容丰富有趣,生活中的好帮手!
时间:2020-11-11 14:18:18
// 监听滚动条 获取指定元素到可视区域顶部的距离$(window).scroll(function(){var box=document.getElementById('scroll');console.log(box.getBoundingClientRect().top)})