css一個div設置多個背景圖片


html:定義一個div

  <div class="item__content"></div>

css:樣式

.item__content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    font-size: 40px;
    box-sizing: border-box;
    color: #18314F;
    background-color: #051a2d;
    background-image: url('../img/bg/border-line.png') ,url('../img/bg/border-line.png'),url('../img/bg/border-line.png'),url('../img/bg/border-line.png');
    background-position: top left,top right,bottom left,bottom right;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    overflow: hidden;
}

樣式:(四個角的發光橫線)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM