The large, small, and dynamic viewport units

New CSS units that account for mobile viewports with dynamic toolbars.

The viewport and its units

To size something as tall as the viewport, you can use the vw and vh units.

  • vw = 1% of the width of the viewport size.
  • vh = 1% of the height of the viewport size.

Give an element a width of 100vw and a height of 100vh, and it will cover the viewport entirely.