Mobile Web Terminal Interactive optimization

Source: Internet
Author: User

There is no mouse input on the mobile device, and some mouse events, such as hover, are no longer in effect and are replaced by touch event touch

The Click event response on the mobile Web page is slower 300ms

How does 300ms delay break?

Replace the Click event with a tap event

Tap events generally refer to the Move frame library Zepto.js

Tap BUG: If a BTN has a mask on it, clicking on the mask will not only trigger the Click event on the mask, but also the Click event on the BTN.

Click event and tap event triggering process

Touch event:

Touch is the core event of mobile device interaction

Touchstart: Finger touch screen trigger (the finger is already on the screen and will not be triggered)

Touchmove: Swipe the finger on the screen to trigger continuously

Touchend: Triggers when the finger leaves the screen

Touchcancel: Triggered when the system cancels touch (not commonly used)

Touch events contain proprietary touch properties in addition to common event properties

Touches: An array of touch objects that track touches

Targettouches: An array of touch objects for a specific event target

Changetouches: An array of touch objects that last touched the change

Bug of Touch event:

Elastic scrolling: When the client's page scrolls to the top or bottom, the scroll bar shrinks and lets us scroll a certain distance. Gives the user a good experience by buffering the bounce effect

Mobile Web pages also have this ability, but there are several things to consider in scrolling,

Body Layer Scrolling: (System special Processing)

Self-Elastic scrolling: Overflow:hidden (fail), GIF and timer paused

Partial scrolling: No elastic scrolling, no rolling inertia, no flow

Partial scrolling turns on elastic scrolling:

  body{      Overflow:scroll;     -webkit-overflow-scrolling:touch;  

Note: Android does not support native elastic scrolling! But you can use third-party library Iscroll to implement

Drop-down refresh: The top drop down a little bit away from the page elastic scrolling down

Pull-up loading

Use the scroll event instead of the touch event (Android has Bugs)

Common Bug Solutions:

Mobile Web Terminal Interactive optimization

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.