我已经编写了以下代码,但我根本无法理解为什么我设置为背景的图像不会垂直拉伸以覆盖整个页面。我会很感激你的帮助
html{
height: 100%;
overflow-y: scroll;
}
html:after{
margin-bottom:0;
content : "";
background: url("../images/van1.jpg") no-repeat center center;
background-size:cover;
width: 100vw;
height: 100vh;
position: absolute;
overflow: hidden;
top: 0;
left: 0;
opacity: 0.5;
filter: alpha(opacity=50);
z-index: -1;
}`