How to solve the problem of sliding lag on the mobile terminal in h5

王林
Release: 2020-11-24 16:27:42
forward
7099 people have browsed it

How to solve the problem of sliding lag on the mobile terminal in h5

The solution is as follows:

(Related video recommendations:html video tutorial)

1. ios side The -webkit-overflow-scrolling attribute can control the page scrolling effect. The settings are as follows to achieve inertial scrolling and elastic effects:

body{ -webkit-overflow-scrolling: touch; overflow-scrolling: touch; overflow-y: scroll; }
Copy after login

2. Caused by the box setting a height of 100%:

html,body{ height: 100%; }
Copy after login

Replace the above Just delete the code.

3,If neither of these two methods works, there is another solution, which is to use the area sliding component in the mui component

Copy after login

Configure the value in scroll according to your actual situation.

Note: bounce: true must be true. If changed to false, the entire page will not be able to slide

Related recommendations:h5

The above is the detailed content of How to solve the problem of sliding lag on the mobile terminal in h5. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
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!