<div id="background">
<div id="son">
</div>
</div>
在css中
#background{
background-image: url("../assets/下载.png");
background-color: black;
width: 100vw;
height: 100vh;
position: relative;
}
#son{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
这样即可实现垂直居中