Mobile-side development

Source: Internet
Author: User

  • Viewport
    • <meta name= "viewport" content= "Width=device-width,
      height=device-height,user-scale=no.initial-scale=1.0,
      minimun-scale=1.0,maximun-scale=1.0,target-densitydpi=device-dpi "/>

      • device-width/values (most Android phones do not support, Apple phone support)
      • Height may not be set and will be automatically scaled according to the width.
      • Dpi//ios not supported, most Android support.
    • Media Enquiry
      • @media
        • All media type
        • and () Link function
        • Only specific devices
        • Not exclude device
      • Media features
        • (max-width:500px)
        • (min-width:300px)
        • (orientation:portrait) Vertical screen
        • (orientation:landscape) Horizontal screen
        • (-webkit-min-device-pixel-ratio:2) pixel ratio
  • Mobile-side adaptation scheme
    • Page Set Fixed width 320px,margin Center, left and right left white with background fill
    • Use media to set different styles according to different resolutions
    • Proportional scaling by means of, percentage, Flex, or REM
    • Rem
      • Em relative to the font size FONT-SIZE=16PX 1em=16px;
      • ren relative to root node HTML font size HTML font size is 16px 1rem=16px;
    • The head and the bottom of the fixed can not be fixed positioning, there will be compatibility problems, with absolute positioning.

Mobile-side 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.