There are several minor problems with mobile web pages and mobile Web pages.

Source: Internet
Author: User

There are several minor problems with mobile web pages and mobile Web pages.

Recently I encountered several minor problems when I was working on a mobile page. This problem occurs in Android 2.x.

The first problem encountered was that the mobile phone did not support overflow: scroll. In Android earlier than 4.0, the overflow: scroll attribute was not supported. The method to solve this problem is to add the touchstart and touchmove events to the elements that require rolling, and determine the rolling direction by judging the difference between the last coordinate of each rolling and the current coordinate, change the value of the scrollTop and scrollLeft attributes of an element at the same time.

There are two other minor issues: one is insufficient support for rounded corners. The value of the rounded corner attribute can be a percentage or a general number. But once I saw that two elements on a page with rounded corners were actually circle and square. After reading the code, we found that android of earlier versions does not support the percentage value of rounded corners, so the solution to this problem is not to use the percentage. Another problem is the positioning of the elements in the table. An element must be absolutely located in the upper right corner of td. If the element is relatively located in td, it is absolutely located, the result is displayed normally in 4.0. The element above 2.3 is displayed in the upper-right corner of the browser. The element is located relative to the browser and has no reference to its parent element. After trying, I found that this problem was well solved by adding an element (relative positioning) in td ), then, the reference element of the element to be located is the correct reference to its parent element.

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.