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