html - What are the differences between these web units? -
possible duplicate:
what difference px,em , ex?
what differences between these web units? pros , cons, , appropriate time use each of them?
px, ex, em, pt, %
px
stands pixels. says on tin: each dot on screen pixel.
ex
refers x-height of given font, i.e. height of lowercase letter x font.
em
refers maximum height required font. commonly-used relative font size because calculated based on computed font size of element (or parent if inherited).
pt
stands typographic point, 1/72 of inch.
%
percentage relative given property otherwise inherited element's parent.
note em
, %
work same way. ems decimal representation of percentages, i.e. 1 = 100%, 0.01 = 1%.
you can find more units @ css3 spec.
Comments
Post a Comment