อ้างอิงหน่วย CSS
| Unit | Name | Type | Description | Example |
|---|---|---|---|---|
| px | Pixels | absolute | One pixel on screen. The most basic unit. | font-size: 16px; |
| em | Em | relative | Multiple of the parent element font-size. | padding: 1.5em; |
| rem | Root Em | relative | Multiple of the root (html) element font-size. | margin: 2rem; |
| % | Percent | relative | Percentage relative to the corresponding parent property. | width: 50%; |
| vw | Viewport Width | viewport | 1% of the viewport width. | width: 100vw; |
| vh | Viewport Height | viewport | 1% of the viewport height. | height: 100vh; |
| vmin | Viewport Min | viewport | 1% of the smaller of vw and vh. | font-size: 5vmin; |
| vmax | Viewport Max | viewport | 1% of the larger of vw and vh. | width: 50vmax; |
| dvh | Dynamic VH | viewport | Dynamic viewport height (accounts for mobile address bar). | height: 100dvh; |
| svh | Small VH | viewport | Smallest viewport height. | min-height: 100svh; |
| lvh | Large VH | viewport | Largest viewport height. | max-height: 100lvh; |
| ch | Character | relative | Based on the width of the "0" character. | max-width: 60ch; |
| ex | X-Height | relative | Based on the height of the "x" character. | line-height: 2ex; |
| cm | Centimeters | absolute | Centimeters. For print. | width: 10cm; |
| mm | Millimeters | absolute | Millimeters. For print. | margin: 5mm; |
| in | Inches | absolute | Inches (1in = 96px). | width: 2in; |
| pt | Points | absolute | Points (1pt = 1/72in). | font-size: 12pt; |
| cqi | Container Inline | container | 1% of the container inline size. | font-size: 5cqi; |
| cqb | Container Block | container | 1% of the container block size. | padding: 2cqb; |
19개 표시 중
อัปเดตล่าสุด: 2026 · เครื่องมือออนไลน์ฟรี
อ้างอิงหน่วย CSS คืออะไร?
ข้อมูลอ้างอิงหน่วย CSS ออนไลน์ฟรี ครอบคลุม px, em, rem, %, vw, vh, vmin, vmax, ch ตามหมวดหมู่ พร้อมอธิบายว่าควรใช้หน่วยสัมบูรณ์และสัมพัทธ์แต่ละชนิดเมื่อใดและอย่างไร
วิธีใช้งาน
- 1ป้อนข้อมูล— ป้อนข้อมูลที่ต้องการ
- 2ผลลัพธ์— ตรวจสอบผลลัพธ์ที่ประมวลผล
- 3คัดลอก— คัดลอกผลลัพธ์ไปใช้งาน
เครื่องมือที่เกี่ยวข้อง
สูตรโกง Regexชีตสรุป regex ฟรีที่ค้นหาได้ จัดระเบียบไวยากรณ์นิพจน์ทั่วไปตามหมวดหมู่ เช่น เมตาคาแร็กเตอร์ ตัวระบุจำนวน แองเคอร์และกลุ่ม คัดลอกแพตเทิร์นได้ในคลิกเดียวและเข้ากันได้กับ regex ของ JavaScript
สูตรโกง Gitชีตสรุปคำสั่ง Git ออนไลน์ฟรี ค้นหาได้และจัดเป็นหมวดหมู่ ตั้งแต่ branch และ merge ไปจนถึง rebase, stash และ reset แต่ละคำสั่งแสดงวิธีใช้และระดับความเสี่ยงเพื่อเลี่ยงข้อผิดพลาด
คำถามที่พบบ่อย
อ้างอิงหน่วย CSS ฟรี ครอบคลุมหน่วยความยาว มุม เวลาทั้งหมด
ไม่ การประมวลผลทั้งหมดเกิดขึ้นในเบราว์เซอร์ของคุณ
ใช่ การออกแบบ responsive ทำงานบนอุปกรณ์มือถือ