When creating a page CSS style, it is essential to have a beautiful background image. In order to ensure that the resolution size of each visitor is different, we will choose to use a tiled color code or small image as the background, so how to make a large HD image as the background, regardless of the visitor's resolution, will automatically stretch the display, I am also worried about this problem. I visited the Internet and consulted my friends. I found the code that made the background image adaptive to the browser window size and automatically stretched it, and shared it with friends who needed it.
You only need to copy the following code to the <body> tab of the page. Of course, if your big picture is too large to be downloaded in the space, you can put the picture in Baidu Development Center BAE, for example, all these big charts are hosted in BAE.
If you use this code, cancel the background style at the body tag in the CSS style. In addition, this effect does not support IE6 browsers.
<Div id = "web_bg" style = "position: absolute; width: 100%; height: 100%; z-index:-1">
</Div>