图片存放在assets下
样品展示
<style scoped>
html {
width: 100px;
height: 100px;
}
body {
width: 100px;
height: 100px;
}
#background {
//图片路径
background-image: url("../assets/image/3379.jpg");
width: 100%;
height: 100%;
position: fixed;
background-size: 100% 100%;
}
.login-box {
border: 1px solid #dccfcf;
width: 350px;
margin: 180px auto;
padding: 35px 80px 15px 35px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
box-shadow: 0 0 25px #909399;
background-color: rgba(255, 255, 255, 0.7);
}
</style>