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