Web Design – Viewport-Relative CSS3 Units


In CSS3, lengths can also be expressed relative to the viewport size, which is very useful in mobile-friendly website design .

Unit Description
vw 1% of the width of the initial containing block.
vh 1% of the height of the initial containing block.
vmin The smallest vw and vh.
vmax The largest vw or vh.