我希望页面/主体能填充渐变背景。这是我尝试过的方法。它有效,但在滚动后无法延伸到页面的完整高度。
body {
width: 100%;
height: 100%;
background: #034b52 url(../../themes/images/bg.jpg) no-repeat center fixed;
color: #fff;
}
body:after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background: linear-gradient(to bottom, rgba(3, 75, 82, 1) 0%, rgba(3, 75, 82, 0) 100%);
content: '';
z-index: -1;
}