Home >Web Front-end >HTML Tutorial >How to stretch the background image to 100% in css_html/css_WEB-ITnose

How to stretch the background image to 100% in css_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:19:04871browse

css

Heroes, I have a question:
Assume that the width of the user's monitor is 1000px, then use background-image to set a background image with a width of 800px, and then arrange the image Set to no-repeat. The problem arises. There is still 200px of blank webpage space. How to set this 800px width image to 100% of the user's display width, that is, stretch the background image.

Reply to discussion (solution)