其他分享
首页 > 其他分享> > 给图片加上某种颜色的蒙版

给图片加上某种颜色的蒙版

作者:互联网

.welcome-hero{
    display: flex;
    align-items: center;
    justify-content: center;
    position:relative;
    background:url(../images/about/welcome-banner.jpg)no-repeat;#图片
    background-size:cover;
    background-position: center;
    height:890px;
}
.welcome-hero:before{
    position:absolute;
    content: " ";
    top:0;
    left:0;
    background:rgba(31,44,108,.65);#添加上去的颜色
    width:100%;
    height:100%;
}

 

标签:蒙版,颜色,center,welcome,height,content,background,position,某种
来源: https://www.cnblogs.com/Gaoqiking/p/11027394.html