源码 j、源码 j-step-c8
我们来直接仿造 微信网页版 的登录界面
首先我们在renderer目录下创建assets文件夹,在assets文件夹下放入login-bg.jpg
- views/Login.vue
使用手机微信扫码登录
#login {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: url(../assets/login-bg.jpg) no-repeat 50%;
background-size: cover;
}
#card {
width: 300px;
height: 400px;
display: flex;
flex-direction: column;
background-color: white;
}
#code-img {
width: 270px;
height: 270px;
margin: 20px auto 10px;
}
#code-img img {
width: 270px;
height: 270px;
}
#msg {
text-align: center;
}
- renderer/App.vue
...
// 添加 css
html, body, div {
margin: 0;
padding: 0;
}
html, body {
height: 100%;
}
#app {
height: 100%;
}



