Crawl pit road on the mobile side

Source: Internet
Author: User

For the time being there are several common needs to be noted to prevent being pits.

1, the mobile browser will suddenly narrow the top bar or simply disappear. This is due to the use of the browser default sliding event. So the whole project either uses sliding events or only touch swipe events, such as Better-scroll.
2, iOS to h5css position attribute support is a problem, such as fixed and input use simultaneously, will cause input to get focus fiexd layout invalidation, this is fiexd unfriendly support caused.

3, the layout is the mobile side of a big pit, especially some properties in fact, many mobile phone manufacturers deep optimization of the system browser support is not very good, such as Huawei, Meizu, such as IMG span label use in order to be compatible, it is best to add display block display Inline-block Properties, because the Block property is basically supported, but Inline-block does not necessarily support it, but if you do not add block, only add inline-block will be problematic.

4, Line-hieght must cooperate with the height use, otherwise in some browsers will not support.

5, to the IMG plus 100% attribute or to the IMG parent tag plus 100% attribute will be a part of the browser compatibility issues, it is best to add a specific value.

6. Flex properties are not as well supported on the mobile side, so use the flex layout to add the block attribute.

Only so much for the moment, and then add.

Crawl pit road on the mobile side

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.