How to get 'div' shaped as a flag with CSS

前端 未结 7 1693
旧巷少年郎
旧巷少年郎 2020-12-17 23:43

I want to add a label on some of my elements on a website and design for a label that is a flag with an inverted V-shaped cut at the bottom.

So far I have this:

7条回答
  •  自闭症患者
    2020-12-18 00:24

    A quick workaround is to rotate it:

     transform: rotate(90deg);
    

    Fiddle


    Another solution would be an SVG path, here's a fiddle!.

提交回复
热议问题