How to realize the slow motion after the touch event is dragged on the mobile terminal?

is to drag the content. After letting go, the content will continue to slow down for a period of time until it stops. How to achieve this

Nov.29,2021

touchend trigger a timer 3s decreasing the value of scrollTop to achieve this effect.


is difficult to achieve alone. It needs to do some calculations to ensure that the animation is more round.
if it is only a browser with webkit kernel, you can use this attribute to implement it: -webkit-overflow-scrolling: touch

Menu