首页 > 技术文章 > HTML页面添加背景图

lwl80 2021-03-09 22:36 原文

css

1    body {
2             width: 100%;
3             height: 100%;
4             background-image: url("/static/img/loginBg.jpg");
5             background-size: 100% 100%;
6             background-attachment: fixed;
7         }

 

展示效果如下

 

 

推荐阅读