vw (viewport width) is based on the width of the viewport, while vh (viewport height) is based on its height, both scaling elements accordingly.