如何设置背景图片填充整个屏幕并自适应
background: url(../assets/img/showBg.png) no-repeat top center;
background-size: cover;
background-attachment: fixed;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
原文链接 https://blog.youkuaiyun.com/weixin_44535797/article/details/89283774?utm_medium=distribute.pc_relevant_right.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant_right.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase