REM Mobile End rasterization adaptation

Source: Internet
Author: User

1.rem

REM (font size of the root element) refers to units relative to root elements

<HTML>    <Head>         <styletype= "Text/css">HTML{font-size:20px;              }Div{width:100rem;Height:60rem;            }         </style>     </Head>    <Body>        <!--Div width: 20px =200px; height * 20px = 120px -         <Div></Div>    </Body></HTML>

2. Mobile-side Rasterization

(1) Divide the width of the mobile screen of different size into the same number of fragments, the length of this fragment is the height and width of the grid. Suppose the number of rasters in the landscape is 16: If the width of the screen is 320px, the width and height of each raster is 20px, and if the screen width is 240px, the width and height of each raster is 15px. Different screens have the same number of grids, and the size of the lattice changes with the size of the screen, and the width and height of an element occupy a fixed number of squares.

REM Mobile End rasterization adaptation

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.