:before and background-image… should it work?

后端 未结 6 1598
死守一世寂寞
死守一世寂寞 2021-01-31 01:25

I\'ve got a div and apply :before and :after an image as content. That works perfectly. Now I would need to apply a background image so it does repeat

6条回答
  •  一生所求
    2021-01-31 02:12

    @michi; define height in your before pseudo class

    CSS:

    #videos-part:before{
        width: 16px;
        content: " ";
        background-image: url(/img/border-left3.png);
        position: absolute;
        left: -16px;
        top: -6px;
        height:20px;
    }
    

提交回复
热议问题