Skip to main content
DevTools24

حاسبة وحدات CSS

التحويل بين وحدات CSS بما في ذلك px و rem و em و pt و vw و vh. يتضمن معاينة الحجم ومرجع أحجام الخطوط الشائعة.

Pixels
16px
REM
1rem
EM
1em
Points
12pt
Percent
100%
VW
0.8333vw
VH
1.4815vh
16px × 16px

Sample text at 16px

Note: REM is relative to root font size. EM is relative to parent font size. VW/VH are relative to viewport dimensions.

CSS Units - التفاصيل التقنية

REM is relative to root font size (usually 16px). EM is relative to parent element font size. VW and VH are percentages of viewport width and height respectively.

بديل سطر الأوامر

/* CSS unit examples */
html { font-size: 16px; }
.text { font-size: 1rem; }    /* 16px */
.large { font-size: 1.5rem; } /* 24px */
.full-width { width: 100vw; }

المرجع

عرض المواصفات الرسمية