首先,login页面一般下属于App.vue底下的子页面。
本人在login页面使用了background-image加载背景图片
1、在App.vue中,使页面的高度始终是100%的可视高度,那么页面的height应该设置为100vh。
2、在子页面,即login页面中,使背景图的高度为height:100%;并且使用到
backgroud-size: cover;
background-attachment: fixed; 该属性的具体使用可以参照该文章
https://www.cnblogs.com/starof/p/4511367.html
.page-user-center{
position: relative;
height: 100%;
background: url(../../assets/images/bg_login.png) 50% no-repeat;
background-size: cover;
background-attachment: fixed;
}