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

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

猜你喜欢

转载自www.cnblogs.com/skybluetwo/p/10967634.html
今日推荐