1.3 KiB
1.3 KiB
title, type, tags, authors, cover, excerpt
| title | type | tags | authors | cover | excerpt |
|---|---|---|---|---|---|
| CSS units Cheat Sheet | cheatsheet | css,layout,cheatsheet | chalarangelo | blog_images/measuring.jpg | Learn everything you need to know about CSS units with this handy cheatsheet. |
px: Absolute pixel valuerem: Relative to thefont-sizeof the root elementem: Relative to thefont-sizeof the element%: Relative to the parent elementvw: Relative to the viewport's width,1vw=1%* viewport widthvh: Relative to the viewport's height,1vh=1%* viewport heightvmin: Relative to the viewport's smaller dimension,1vmin= min(1vh,1vw)vmax: Relative to the viewport's larger dimension,vmax= max(1vh,1vw)ch: Relative to the width of the glyph "0" of the element's fontin: Inches1in=2.54cm=96pxpc: Picas1pc=1in/6=16pxpt: Points1pt=1in/72=1.333px(approximately)cm: Centimeters1cm=96px/2.54=37.8px(approximately)mm: Millimeters1mm=1cm/10=3.78px(approximately)
Image credit: Sharon Sivertsen on Unsplash