效果如下:
实现代码:
.head {
background-image: url("~@/static/images/user01.png");
background-size: 100% 100%;
background-color: #202020;
position: relative;
width: 100%;
}
.head::before{
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 8%;
background: linear-gradient(to bottom, #202020, #f5f5f5);
z-index: 1;
}