我需要這個計數器從滾動開始,而不是之前。是否可以?function startCounter(){ $('.counter').each(function (index) { $(this).prop('Counter',0).animate({ Counter: $(this).text() }, { duration: 2000, easing: 'swing', step: function (now) { $(this).text(Math.round(now*10)/10); } }); });} startCounter();<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><span class="counter">92.2</span>
Javascript 計數器從滾動開始
郎朗坤
2021-06-30 08:23:50