一、当前滚动的地方的窗口顶端到整个页面顶端的距离:spa
var winPos = $(window).scrollTop();orm
二、获取指定元素的页面位置:it
$(val).offset().top;io
三、对页面滚动条滚动的监听:要放在页面加载的时候event
$(window).scroll(function(event){function
});scroll
四、设置滚动条到指定位置。$(window).scrollTop(offset)。top