CSS3-Labels
<!-- http://html5snippets.com/snippets/46-css3-label-tag# -->
HTML
<!-- http://html5snippets.com/snippets/46-css3-label-tag# -->
<span class="tag">
<span class="tail"></span>
this is a tag
</span>
<span class="tag">
<span class="tail"></span>
that's one badass
</span>
<span class="tag">
<span class="tail"></span>
more tags are awesome
</span>
CSS
* {padding:0; margin:0;}
body {font: 10px/1 sans-serif; padding:40px;}
.tag {
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.43, rgb(120,120,250)),
color-stop(0.7, rgb(120,120,200))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(250,192,75) 43%,
rgb(252,219,110) 70%
);
border: 1px solid #fff;
color: #eee;
display: block;
float: left;
clear: both;
font-weight: 700;
margin: 0 0 20px;
padding: 6px 6px 6px 8px;
position: relative;
text-transform: lowercase;
z-index: 1;
border-radius: 0 3px 3px 0;
}
.tail {
background-image: -webkit-gradient(
linear,
100% 100%,
0 0,
color-stop(.3, rgb(120,120,250)),
color-stop(.7, rgb(120,120,200)));
border: 1px solid #fff;
border-right: 0;
border-top: 0;
position: absolute;
height: 15px;
left: -9px;
top: 3px;
width: 15px;
z-index: -1;
-webkit-transform: rotate(45deg);
}