jquery元素到窗口顶部的距离

$('元素').offset().top - $(window).scrollTop();

猜你喜欢

转载自blog.csdn.net/sd19871122/article/details/88686312