排版 / CSS 单位换算器 — CSS has many length units. Absolute units (px, pt, pc, in, cm, mm) are tied to physical measurements. Relative units (em, rem, %) are tied to font size or the root font size. The browser default font size is 16px; this converter assumes that base.
Conversions run locally in your browser. No values are sent anywhere.
Was 排版 / CSS 单位换算器 useful?
排版 / CSS 单位换算器是什么?
CSS has many length units. Absolute units (px, pt, pc, in, cm, mm) are tied to physical measurements. Relative units (em, rem, %) are tied to font size or the root font size. The browser default font size is 16px; this converter assumes that base.
Note: the em and rem conversions depend on the font-size context. If a CSS rule sets a different base font size, the em values change accordingly.
使用方法
-
Enter a value
Type the length in any supported unit. The default is 1 px.
-
Pick the units
The from/to dropdowns cover all the CSS length units: px, pt, pc, in, cm, mm, em, rem, %.
-
Mind the base
em assumes 16px base (browser default). rem also assumes 16px root. If your CSS uses a different base, multiply the em/rem result accordingly.
示例
12pt to px
12pt (a common body-text size) is exactly 16px in CSS.
12 pt
结果: = 16 px (at 96 DPI / 1px = 0.75pt)
常见问题
相关工具
Last reviewed: 2026-11-21