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;
}

样式:(四个角的发光横线)

 

posted @ 2019-06-03 15:02  勤劳的蜜蜂  阅读(4546)  评论(0编辑  收藏  举报