Css Flashcards
1
Q
css Relative units - ch/em/rem/ex
A
em — font size of the element , relative to its parent(3em means that 3 times the normal font size)
rem — font size of the element, relative to the root html element
ch unit sets the width relative to the width of a single character as in “0”.
eg: div{width:10ch};
ch — width of the “0” character (in monospace fonts all characters are of equal width)
ex —x-height of the font used (the height of “x” character)
2
Q
css Viewport Units
A
vw — % of viewport width eg: h1 { font-size: 10vw; } vh — % of viewport height vmin — % of the smaller dimension (width or height) vmax — % of the larger dimension (width or height)