Use CSS3 to design the background image to automatically scale the full screen display effect
CSS3 design background image auto-scaling full-screen display effect is the basis of many new generations of web design. This effect is that the background image automatically zooms to the full screen as the web page size zooms. It is very simple to design such an effect. Just add CSS the background attribute combination CSS3 's background-size property, both with them will be able to design an automatic full screen background picture display of results, we will be in the background add background images and picture presentation attributes, but also in background-size property to set the background The way the picture is filled, the actual visual effect is not bad, and it is also supported by various new versions of mainstream browsers.
Use CSS3 to design the background image to automatically zoom the full screen display effect example syntax
body{
margin:0px;
padding:0px;
background:#fff url(background image URL) center center fixed no-repeat; //Set the presentation method of the
background image background-size: cover; //Set the background image Filling method
}
</style>
In addition, the effect that the background image of the webpage automatically fills and zooms automatically uses the background attribute instead of the background-image background image attribute.
Post a Comment
0 Comments