CSS3 introduced two units for representing size.

div { 
  width: 20vw; 
  height: 20vh;
}

Above, the size for the div takes up 20% of the width and height of the viewport