CSS3 label tag facing right and using position or :after

后端 未结 2 428
清酒与你
清酒与你 2021-01-21 16:12

I am trying to construct this shape in CSS:

\"enter

But I can\'t figure out how to

相关标签:
2条回答
  • 2021-01-21 16:54

    Just add a line-height to .tag

    .tag {
    line-height: 10px;
    /* the rest of your styles here */
    }
    

    http://jsfiddle.net/ExZFe/3/

    0 讨论(0)
  • 2021-01-21 16:56

    Simply position the triangle using the right property (which start from the right of the rectangle) instead of the left (which starts from the left of the rectangle and is useless here as you can't know the width of the tags): http://jsfiddle.net/Gv3rf/

    0 讨论(0)
提交回复
热议问题