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

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

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM