1、首先准备一个div
<div id="background"></div>
2、编写css
#login {
background: url("../assets/images/content.jpg") no-repeat;
background-position: center;
height: 100%;
width: 100%;
background-size: cover;
position: fixed;
}
3.大功造成
1、首先准备一个div
<div id="background"></div>
2、编写css
#login {
background: url("../assets/images/content.jpg") no-repeat;
background-position: center;
height: 100%;
width: 100%;
background-size: cover;
position: fixed;
}
3.大功造成