Some site pages if you add a good-looking background image is more noticeable, but how do we do the background image of the page set it? It is also often required to display the HTML background image tiling. This should not be difficult for a friend who knows a little bit about html/css knowledge. So this article is mainly for the novice friends, to detail the HTML background map to add the use of methods. Can be for everyone's reference.
One, the HTML background map horizontal tiling code example:
<style type= "Text/css" > body{ font-size:12px; font-family: "Song body"; Background-image:url (2.png); Background-repeat:repeat-x; COLOR: #0C2B30; } </style>
Effects such as:
Two, HTML background map Portrait Tile code example:
body{ font-size:12px; font-family: "Song body"; Background-image:url (2.png); Background-repeat:repeat-x; COLOR: #0C2B30; }
Effects such as:
Three, the HTML picture full screen code example:
html,body{ width:100%; height:100%;}. mui-content{ Background:url (2.png) bottom center no-repeat #efeff4; background-size:100% 100%; width:100%; height:100%;}
Effects such as:
So the above gives you a summary of how to let HTML set background image, HTML background tile and other related knowledge. Hope to be helpful to the needy friend.
Note:
The background shorthand property sets all the background properties in a declaration.
The Background-size property specifies the size of the background image.
The Background-repeat property sets whether and how the background image is repeated. The default background image repeats in both horizontal and vertical directions.
The Background-image property sets the background image for the element.
The background of an element occupies the full dimensions of the element, including padding and borders, but excluding margins. By default, the background image is in the upper-left corner of the element and repeats in both horizontal and vertical directions.