您可以使用一些 css 技巧(在 + 定位之后)轻松获得此标签标签:
HTML:
<span class="label-tag">Type</span>
CSS:
.label-tag {
display:inline-block;
position: relative;
height: 20px;
line-height: 20px;
padding: 10px 20px;
color: white;
background-color: #509e2f;
}
.label-tag:after {
content: '';
position: absolute;
left: 100%;
top: 0px;
border-width: 20px 0px 20px 20px;
border-style: solid;
border-color: transparent transparent transparent #509e2f;
}
工作小提琴:https : //jsfiddle.net/bd45gynk/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句