javascript - How to disable the rubber band effect that appears on sarafi and IE on the mobile side
大家讲道理
大家讲道理 2017-05-19 10:12:15
0
1
560

In the Safari browser on iOS, when the web page is scrolled to the top, you can scroll another distance like a rubber band and rebound after letting go. This effect also exists on Windows tablets.

Please tell me how to use css to disable this effect, because it often affects the scrolling inside the page. As far as I know, there is a css attribute that can be used.

Which one is it?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all (1)
为情所困
document.addEventListener('touchStart',function(e){ e.preventDefault(); })

The mobile version eliminates the rubber band effect by blocking the default event, but there is a disadvantage. The default event is blocked, the a label cannot be clicked, and the page must simulate a scroll bar

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!