Viewport units are values you can use in your CSS to size elements. 1 viewport unit is equivalent to 1% of a viewport dimension. There are four viewport units that you can use in your CSS: vw
, vh
, vmin
and vmax
.
1vw
is 1% of the width of the viewport.1vh
is 1% of the height of the viewport.1vmin
is 1% of whichever is smaller, the width or the height of the viewport.1vmax
is 1% of whichever is larger, the width or the height of the viewport.