CSS单位换算
支持px、rem、rpx、em、vw、vh、%、pt、ch九种CSS单位精准互转。自定义根字体、父级字体、DPI、设计稿宽度,点击可复制转换结果。
28次使用 免费
1rem = {{ rootFontSize }}px 1em = {{ parentFontSize }}px 1ch = {{ chRatio }}em ≈ {{ (chRatio * parentFontSize).toFixed(2) }}px 1pt = 1/72in ≈ {{ (dpi / 72).toFixed(4) }}px @ {{ dpi }}dpi rpx: {{ rpxStandard === 'custom' ? rpxCustomBase : rpxStandard }}rpx = {{ designWidth }}px 视口: {{ viewportWidth }} × {{ viewportHeight }}px 父容器: {{ parentContainerWidth }} × {{ parentContainerHeight }}px %: 相对父字号 ({{ parentFontSize }}px) %: 相对父宽 ({{ parentContainerWidth }}px) %: 相对父高 ({{ parentContainerHeight }}px)
换算结果 点击卡片复制换算值
{{ formatResult(results[unit]) }} —
{{ unit }}
{{ unitLabels[unit] || unit }}