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