更新时间:2022-06-22 01:10:57
您可以尝试类似的情况:
You may try this similar case:
$(window).scroll(function() {
$("div").each( function() {
if( $(window).scrollTop() > $(this).offset().top - 100 ) {
$(this).css('opacity',1);
} else {
$(this).css('opacity',0);
}
});
});