移動端頁面的像素計算:
設(shè)計圖的像素 / 2 = 前端css要寫的像素
如果使用rem的話:
1rem = html設(shè)置的字體大小,為了方便計算,一般設(shè)置html的字體大小為 50px,這樣的話,前端要寫的REM的值 = 設(shè)計圖的像素 / 2 / 50 (也就是設(shè)計圖的像素/100就可以了)
移動端頁面的像素計算:
設(shè)計圖的像素 / 2 = 前端css要寫的像素
如果使用rem的話:
1rem = html設(shè)置的字體大小,為了方便計算,一般設(shè)置html的字體大小為 50px,這樣的話,前端要寫的REM的值 = 設(shè)計圖的像素 / 2 / 50 (也就是設(shè)計圖的像素/100就可以了)