px 是 pixel(像素) 的常用缩写;在网页与界面设计中,px 也指一种长度单位,表示以“像素”为基准的尺寸(如字体大小、边距、边框粗细等)。
/piː ɛks/
Set the font size to 16px.
把字体大小设为 16px。
On high‑DPI screens, a 1px border can appear uneven if it doesn’t align with the device’s pixel grid.
在高 DPI 屏幕上,如果 1px 的边框没有对齐设备的像素网格,看起来可能会不均匀。
px 来自 pixel 的缩写;而 pixel 是 picture element(图像元素) 的合成缩略词,最早用于描述数字图像中最小的可显示单元之一。随着网页标准与 CSS 的普及,px 也固定为常见的样式长度单位写法。