A value of 1vh is equal to 1% of the viewport height
A value of 100vh is equal to 100% of the
viewport height
vw
1vw stands for viewport width
This unit is based on the width of the viewport
A value of 1vw is equal to 1%
of the viewport width
vmin
vmin stands for viewport minimum
This unit is based on the smaller dimension of the viewport
If the viewport height is
smaller than the width, the value of 1vmin will be
equal to 1% of the viewport height
Similarly, if the viewport width
is smaller than the height, the value of 1vmin will be
equal to 1% of the viewport width
vmax
vmax stands for viewport maximum
This unit is based on the larger dimension of the viewport
If the viewport height is
larger than the width, the value of 1vmax will be
equal to
1% of viewport height
Similarly, if the viewport width is
larger than the height, the value of 1vmax will be equal to
1% of the viewport width
Comparison with percentages
Viewport units differ from percentages in that percentage width or height of a
child element is determined with respect to its parent
<div class="div_rems">
Hello World
<div>
Hello World
<div>Hello W</div>
</div>
</div>
lh and rlh
lh and rlh are relative length units similar to
em
and rem
The difference between lh and rlh is that the first one is
relative to the line height of the element itself, while the
second
one is relative to the line height of the root element usually
html