unit
vh — CSS reference
One vh is one hundredth of the physical height of its viewport reference. The unprefixed unit follows the large viewport variant. Viewport sizes are not physical screen dimensions or necessarily the visual viewport during zoom. Scrollbar reservation can affect sizing.
Formal Syntax & Structure
css syntaxcss
width: 10vh;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Relative length lab</title><style>body {margin:0} .sample {height:12px;background:#006050}html {writing-mode:horizontal-tb;overflow:hidden} #a {width:10vh} #b {width:20vh}</style><body><div id="a" class="sample"></div><div id="b" class="sample"></div></body></html>