Dev Patrache

อ้างอิงหน่วย CSS

UnitNameTypeDescriptionExample
pxPixelsabsoluteOne pixel on screen. The most basic unit.font-size: 16px;
emEmrelativeMultiple of the parent element font-size.padding: 1.5em;
remRoot EmrelativeMultiple of the root (html) element font-size.margin: 2rem;
%PercentrelativePercentage relative to the corresponding parent property.width: 50%;
vwViewport Widthviewport1% of the viewport width.width: 100vw;
vhViewport Heightviewport1% of the viewport height.height: 100vh;
vminViewport Minviewport1% of the smaller of vw and vh.font-size: 5vmin;
vmaxViewport Maxviewport1% of the larger of vw and vh.width: 50vmax;
dvhDynamic VHviewportDynamic viewport height (accounts for mobile address bar).height: 100dvh;
svhSmall VHviewportSmallest viewport height.min-height: 100svh;
lvhLarge VHviewportLargest viewport height.max-height: 100lvh;
chCharacterrelativeBased on the width of the "0" character.max-width: 60ch;
exX-HeightrelativeBased on the height of the "x" character.line-height: 2ex;
cmCentimetersabsoluteCentimeters. For print.width: 10cm;
mmMillimetersabsoluteMillimeters. For print.margin: 5mm;
inInchesabsoluteInches (1in = 96px).width: 2in;
ptPointsabsolutePoints (1pt = 1/72in).font-size: 12pt;
cqiContainer Inlinecontainer1% of the container inline size.font-size: 5cqi;
cqbContainer Blockcontainer1% of the container block size.padding: 2cqb;
19개 표시 중
อัปเดตล่าสุด: 2026 · เครื่องมือออนไลน์ฟรี

อ้างอิงหน่วย CSS คืออะไร?

ข้อมูลอ้างอิงหน่วย CSS ออนไลน์ฟรี ครอบคลุม px, em, rem, %, vw, vh, vmin, vmax, ch ตามหมวดหมู่ พร้อมอธิบายว่าควรใช้หน่วยสัมบูรณ์และสัมพัทธ์แต่ละชนิดเมื่อใดและอย่างไร

วิธีใช้งาน

  1. 1
    ป้อนข้อมูล— ป้อนข้อมูลที่ต้องการ
  2. 2
    ผลลัพธ์— ตรวจสอบผลลัพธ์ที่ประมวลผล
  3. 3
    คัดลอก— คัดลอกผลลัพธ์ไปใช้งาน

เครื่องมือที่เกี่ยวข้อง

คำถามที่พบบ่อย

อ้างอิงหน่วย CSS ฟรี ครอบคลุมหน่วยความยาว มุม เวลาทั้งหมด

ไม่ การประมวลผลทั้งหมดเกิดขึ้นในเบราว์เซอร์ของคุณ

ใช่ การออกแบบ responsive ทำงานบนอุปกรณ์มือถือ

เว็บไซต์นี้ใช้คุกกี้เพื่อปรับปรุงประสบการณ์และการโฆษณา เรียนรู้เพิ่มเติม