ToolPal

CSS单位转换器

CSS单位转换:px、rem、em、vh、vw、%、pt、cm、mm。调整基础字体大小和视口以获得准确结果。

上下文设置
px
px
px
px

转换结果

px
16
rem
1
em
1
vh
2.0833
vw
1.5625
%
100.00
pt
12.000
cm
0.4233
mm
4.2333

相对单位(rem、em、vh、vw、%)取决于上下文。调整上方设置以获得准确结果。

使用方法

CSS单位转换:px、rem、em、vh、vw、%、pt、cm、mm。调整基础字体大小和视口以获得准确结果。

  1. 1Enter a numeric value in the 'Value' field.
  2. 2Select the source unit (e.g., px) from the 'From Unit' dropdown.
  3. 3All equivalent values in other CSS units appear instantly.
  4. 4Expand 'Context Settings' to set your base font size and viewport dimensions for accurate rem/em/vh/vw conversions.
  5. 5Click 'Copy' next to any result to copy it to your clipboard.

主要功能

  • Converts between px, rem, em, vh, vw, %, pt, cm, mm
  • Adjustable base font size, parent font size, and viewport dimensions
  • Instant real-time conversion as you type
  • One-click copy for each converted value
  • No server needed — all calculations run in your browser

常见问题

了解更多