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

.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%;
}

 

上一篇:第3章 java的基本程序设计结构


下一篇:Welcome to JimmyCheung's blog!