0 votes
7 views
by
How to set background image width to 100%?

1 Answer

0 votes
by
To stretch the background image to cover the entire viewport, you can use 100vw for width and 100vh for height. In this example, background-size: 100vw 100vh; will stretch the background image to cover the entire viewport, both in width and height. The image will adjust itself as the viewport size changes.
...