Mobile Web page scrolling is not smooth, stutter flash solution

Source: Internet
Author: User

The-webkit-overflow-scrolling property on the 1.ios side controls the page scrolling effect, which is set to implement inertia scrolling and elasticity effects as follows:

-webkit-overflow-scrolling:touch

Page scrolling is not smooth due to 2.position properties:

<div style="overflow-x: hidden; Overflow-y: auto; Position:absolute; height:200px; ">    <div style="position:relative; height:200px; "></div>    <div style="position:relative; height:200px; "></div>    <div style="position:relative; height:200px; "></div></div>

As shown in the code above, when there is relative positioning in the absolute positioned container and the height is greater than the external container, the container's scrolling will appear a flicker phenomenon, the workaround is as follows:

 <div style= " overflow-x: hidden; Overflow-y: auto; Position:absolute; height:200px;   " > <div style="  position:absolute; top:0; left:0;   " > <div style="  position:relative; height:200px;   " ></div> <div style="  position:relative; height:200px;   " ></div> <div style="  position:relative; height:200px;   " ></div> </div></div> 

You can fix the scrolling flicker problem by wrapping the internal relative elements with a absolute container.

Mobile Web page scrolling is not smooth, stutter flash solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.