Some knowledge of developing mobile web

Source: Internet
Author: User
Because of the popularity of the intelligent machine, more and more Web pages support mobile, then how to solve the adaptation of the mobile end in this summary of their own study notes
  • Viewport: Virtual containers, valid only on mobile devices

<meta name= "viewport" content= "width=device-width, user-scalable=no,initial-scale=1.0"/>

Width=device-width: Set width to device width

initial-scale=1.0: Initial Zoom ratio 1.0

User-scalable=no: Do not allow users to scale themselves

In a viewport layout, the width of the box in a Web page is typically set with a percent expert number

  • Click the Highlight Effect

On the mobile side of the default will appear click Highlighting effect, then how to remove its effect?

-webkit-tap-highlight-color:transparent;/* Clear Click Highlighting */

If you want to add color, change transparent directly

  • Prevents box width overflow

All boxes on the mobile side must be set

Box-sizing:border-box;

  • The difference between mobile web development and responsive development

1, generally have a PC-side web, the development of mobile web alone, for mobile, the development of high efficiency, only for mobile devices, pad experience is not good; The code is very concise and fast loading.

2, the general new site, suitable for a variety of terminals; low development efficiency; The code is relatively complex and slow to load.

Some knowledge of developing mobile web

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.