html一像素等于多少px,html – CSS像素是否真的是绝对的单位?那是1英寸= 96px的真?...

根据您已经链接的

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现实生活中的一英寸.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值