CSS .hero-section { height: 100vh; background-color: #f0f0f0; } In this example, the hero section will always occupy the full height of the viewport, no matter what device the user is using. Key Points Relative Sizing:‘vh’ is a relative unit of measurement, meaning its size is cal...
To help with this situation, some new viewport units have been added to CSS, such assvw,svh,lvw,lvh,dvw, anddvh. You can read about them in our comprehensive article onCSS sizing units. Conclusion In this article, we’ve briefly covered the meaning and applications of thevh,vw,vminandvm...
Length units representing a percentage of the current viewport dimensions: width (vw), height (vh), the smaller of the two (vmin), or the larger of the two (vmax). Chrome 4 - 19: Not supported 20 - 25: Partial support 26 - 119: Supported ...