EN
CSS - 100vw meaning
3
points
In this article, we would like to explain the 100vw value meaning in CSS.
Explanation
In CSS, 100vw stands for "100% of viewport width".
Where:
100is a value that means100%,vwis a unit that means viewport width.
Viewport is a rectangular area that contains the part of the web page that is currently visible in web browser window.
If the viewport width is 1000px:
100vwwill be equal to1000px,50vwwill be equal to500px,10vwwill be equal to100px,- etc.
Note: read about viewport in this article.
Practical example
In the example below, we present how you can use 100vw in your CSS to make the .element to be as wide as the viewport.
.element {
width: 100vw;
}