根据您已经链接的
CSS Values and Units Module部分,稍微延伸一下,有两个不同的实现可以应用于CSS:
For a CSS device, these dimensions are anchored either
i. by relating the physical units to their physical measurements, or
ii. by relating the pixel unit to the reference pixel.
这继续注意:
If the anchor unit is the pixel unit, the physical units might not match their physical measurements. Alternatively if the anchor unit is a physical unit, the pixel unit might not map to a whole number of device pixels.
最后,它得出结论:
The reference pixel is the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm’s length. For a nominal arm’s length of 28 inches, the visual angle is therefore about 0.0213 degrees. For reading at arm’s length, 1px thus corresponds to about 0.26 mm (1/96 inch).
这意味着像素单位是绝对长度,但是它的长度可以根据设备是否应用我在这里引用的第一部分的实现i或实现ii而改变.
由CSS值和单位模块定义的绝对长度只是一个“锚定到一些物理测量”的长度.物理测量将是其实际物理长度或由参考像素导出的长度.
具体的同一部分也说:
For print media and similar high-resolution devices, the anchor unit should be one of the standard physical units (inches, centimeters, etc). For lower-resolution devices, and devices with unusual viewing distances, it is recommended instead that the anchor unit be the pixel unit. For such devices it is recommended that the pixel unit refer to the whole number of device pixels that best approximates the reference pixel.
96px并不总是等于1现实生活中的一英寸.