Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些标签,比如
<div> or <img>
当用户滚动页面并且 div 变为可见时,我将显示一个 fadeIn() 动画。 我怎样才能做到这一点?
尝试这个,
$(window).on('scroll',function(){ $('div, img').fadeIn(); });