htmlHow to set the background image: First create an HTML sample file; then use background and style to set the background image.
# Operating environment for this article: Windows 7 system, HTML5&&CSS3 version, DELL G3 computer HTML set picture as page background:
in HTML page How to set an image as the page background without using the CSS box model?
Use background and style in to set
Example:
Here I put the html format files and jpg format image files on the desktopHTML设置图片为页面背景
Running result demonstration:
background=".../...jpg'"
The path to store the image
background-repeat:no-repeat;
Do not display repeatedly
background-attachment:fixed;
position of the picture to be fixed
background-size:100% 100%;
reach 100% of the window
The above is how to set an image as the background of the page without using the CSS box model in HTML Recommended study: "HTML Video Tutorial"
The above is the detailed content of How to set background image in html. For more information, please follow other related articles on the PHP Chinese website!