< div id = "WEB_BG" style = "Position:absolute; width:100%; height:100%; z-index:-1" > < img style = "position:fixed;" src = "Http://a.lanyes.org/bg1.jpg" height = "100%" = "100%" /> </ div >
In the production page CSS style, a good-looking effect background image is indispensable, in order to consider that each guest user's resolution size is not the same, we will choose to use the color code can be tiled or small image as the background, then how to make a large picture of high-definition as the background, Regardless of the resolution size of the guest user, will automatically stretch the display, starting for this problem I also distress, in the online tour of a circle of friends, from which to get the background image to adapt to the browser window size and automatically stretched code, share to the need of friends, just copy the following code to the page <body > tags below can be implemented, of course, if your large map into the space inside the download is very slow, you can put the picture in the Baidu Development center Bae inside, as I stand now these big pictures are placed in Bae inside the escrow. If you use this code, remove the background style from the body tag in the CSS style, and this effect does not support the IE6 browser.
Background Image Adaptive resolution browser size auto stretch full Screen code