Small tip for mobile development

Source: Internet
Author: User

Recently done is two times development, because is the first time to do so there are a lot of things to write down, so that the next time in the mobile end of the time to experience so many pits.

Mobile animation do not use JQ write, JQ Mobile seems to be not.

Our project was finally made using the CSS3 animation, (ANIMATED.CSS). Using Zepto seems to be a good choice too.

There is a 300ms lag (historical reason) when you click on the mobile page, there are many ways to solve it. It may be easier to use zepto or prohibit scaling.

The input box on the mobile side is also a bit tricky: you can have a better user experience at the time of typing, add the type of input: tel; or better.

                  Digital keypad: <inpuut type= ' text ' pattern= "[0-9]*"/> Enter letter case: autocapitalize= ' off ' auto case                     Autocor      Rect= ' on '       automatic error correction when you look at the data, there are some pits and solutions to scroll: the scroll bar is on the body node or higher. Local scrolling: A DOM node under the body of a scrollbar.                    elastic scrolling effect:            &NBSP ;       iOS effects: Full Play scrolling default supports elastic scrolling.                          ,         &NB Sp     Local scrolling requires adding {Overflow:auto} on the DOM node or adding {-webkit-overflow-scrolling:touch;}      on the body                          ,         &NB Sp               It is recommended that you avoid small bugs by placing them directly on the body.                     android: Native does not support elastic scrolling.                             ios:   Local scrolling: page will There is an out-of-bounds situation. (The top or bottom of the case will appear out of bounds,), the local scrolling will be more ugly.                         local scrolling Solutions (scrollfix)                      if (starttopscroll<=0) {        &NBS P                     elem.scrolltop=1;                       }                    IF (Starttopscroll+elem.offsetheight>=elem.scrollheight) {                           elem.scrolltop=el em.scrollheight-elem.offsetheight-1;                     }  & nbsp &nbsP         full-play scrolling there is no good solution, only to change the whole play to local scrolling.                 Android: Try not to use local scrolling, local scrolling has bugs.

Small tip for mobile development

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.