How to code certain css shapes?

前端 未结 5 2225
后悔当初
后悔当初 2021-02-09 10:10

I am trying to make the shape below in CSS. Any ideas how to do this? Or know a tutorial site that can help? I am talking about the tag like shapes that are yellow.

5条回答
  •  梦如初夏
    2021-02-09 10:41

    Looking at the tags you could achieve that affect using :before and :after and CSS3 transforms (rotate the before and after psuedo-classes). It'd be best to use a background-image instead, though.

    To answer your second query – you can easily achieve that effect with border-radius. e.g.

    p {
        -moz-border-radius: 0 0 2px 2px;
        -webkit-border-radius: 0 0 2px 2px;
        border-radius: 0 0 2px 2px;
    }
    

    The values are clockwise from the top left corner to the bottom left corner.

提交回复
热议问题