px: tuyệt đối. em: relative với font-size parent. rem: relative với root (html) font-size. %: relative với parent. vw/vh: % viewport width/height. rem được khuyến nghị cho responsive design. 2023+: svh/dvh/lvh (small/dynamic/large viewport height) xử lý địa chỉ bar mobile tốt hơn vh truyền thống; cqi/cqb cho container query units.
px: absolute unit. em: relative to the parent element's font-size. rem: relative to the root (html) font-size. %: relative to the parent. vw/vh: percentage of viewport width/height. rem is recommended for responsive design. 2023+: svh/dvh/lvh (small/dynamic/large viewport height) handle the mobile address bar better than plain vh; cqi/cqb are container query units.