一、css尺寸
1、屏幕尺寸单位背景知识
使用范围 | 设备像素【物理像素】 | 设备独立像素 | 微信小程序 | H5 |
单位 | px | dip或者dp | rpx |
rem |
单位全称 | pixel | Device Independent Pixels(设备独立像素) | responsive pixel(可以根据屏幕宽度进行自适应) | font size of the root element (根元素的字体大小) |
单位说明 | 以iphone6手机为例,其屏幕的物理分辨率为:750px*1334px。 |
dp = px / device pixel ratio, 其中 device pixel |