📅  最后修改于: 2022-03-11 15:02:28.990000             🧑  作者: Mango
var scrollTop = $(window).scrollTop(),
elementOffset = $('#my-element').offset().top,
distance = (elementOffset - scrollTop);