Home > AI > Language > CSS >

units

unitdescriptionusage
emRelative to the font-size of the element (2em means 2 times the size of the current font)
exRelative to the x-height of the current font (rarely used)
chRelative to the width of the “0” (zero)
remRelative to font-size of the root element
vwRelative to 1% of the width of the viewport*
vhRelative to 1% of the height of the viewport*
vminRelative to 1% of viewport’s* smaller dimension
vmaxRelative to 1% of viewport’s* larger dimension
%Relative to the parent element

Leave a Reply