1 在body里面使用, 一般放在网页的开头编写
<body></body>
2 找到图片存放路径(可以是jpg也可以是gif图片格式)
<body background="图片存放的的路径"
></body>
3 设置图片不重复出现
<body background="photo/动态.gif"
style="background-repeat:no-repeat>
</body>
4 使图片位置固定
<body background="photo/动态.gif"
style="background-repeat:no-repeat;
background-attachment:fixed;>
</body>
5 使背景比例达到窗口的100%文章来源:https://www.toymoban.com/news/detail-514920.html
<body background="photo/动态.gif"
style="background-repeat:no-repeat;
background-attachment:fixed;
background-size:100% 100%; ">
</body>
6 代码展示文章来源地址https://www.toymoban.com/news/detail-514920.html
到了这里,关于HTML图片设置成为页面背景 ( 五个小步骤)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!