Square brackets with CSS

后端 未结 5 1917
花落未央
花落未央 2021-02-14 22:36

I wish to create a [ and ] bracket just with CSS. Is there a way to specify the top and bottom border (Without slicing the image) so it looks like a br

5条回答
  •  太阳男子
    2021-02-14 23:15

    You can use the :after and :sbefore pseudo-elements, with the content property.

    More info

    Something like

    .bracket:after { content: ']' }
    .bracket:before { content: '[' }
    

提交回复
热议问题