人生如梦,一樽还酹江月。

css3如何给背景图片加颜色遮罩

  第一种:
width: 140px; height: 140px; background
-blend-mode: multiply; filter: blur(2px); overflow: hidden;

 

 第二种:
    position: relative;
    width: 140px;
    height: 140px;
    background: url(bg.jpg) rgba(0, 0, 0, .5) no-repeat center center;
    background-blend-mode: multiply;

  

第三种:
<div class="box">
     <div class="inner"> </div>
</div>
.box{
    position: relative;
    width: 1200px;
    height: 400px;
    background: rgba(0, 0, 0, .5);
}

.box .inner {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: url(bg.jpg) no-repeat center center;
    background-size: cover;
    z-index: -1;
}
   

 

---------------------------------------------------------

yarn add -D electron-chromedriver
vue add vue-cli-plugin-electron-builder

------------------------------------------------------

 

 

 

 

posted @ 2019-11-05 09:39  Mrbabibo  阅读(1835)  评论(0编辑  收藏  举报