By default, the background picture is set with the body tag of the HTML code <body background= "X.jpg" >, the picture is automatically tiled horizontally and vertically. This will produce some aesthetic problems. XP people provide CSS code as follows, placed on the head of the page, for reference only: <style type= "Text/css" > Body {background:url (/img/background.png); Background-repeat:repeat-x; background-positon:100%,100%;} </style>
Continued: A few friends said that my article really did not solve their problems, they want to not consider the size of their own background image, no matter how large the screen, their own background image automatically stretched themselves, to fit the screen size, covered the entire screen. So, I'm going to share the following code with you today. To achieve such an effect, consider using a filter. <style type= "Text/css" > body{filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src= '/skin/v2011/ Images/body.png ', sizingmethod= ' scale '); Background-repeat:no-repeat; background-positon:100%, 100%; } </style>
How to implement a background image automatically tiled or stretched to the entire screen (adaptive size) via CSS