<ul class="cp_tag01">
<li><a href="#">Dog</a></li>
<li><a href="#">Cat</a></li>
<li><a href="#">Rabbit</a></li>
</ul>
.cp_tag01 {
list-style: none;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.cp_tag01 li {
display: inline-block;
}
.cp_tag01 a {
line-height: 26px;
position: relative;
display: inline-block;
height: 26px;
margin: 0 10px 10px 0;
padding: 0 20px 0 23px;
-webkit-transition: color 0.2s;
transition: color 0.2s;
text-decoration: none;
color: #455a64;
border-radius: 3px 0 0 3px;
background: #cfd8dc;
}
.cp_tag01 a::before, .cp_tag01 a::after {
background: #fafcfc;/*背景色*/
}
.cp_tag01 a::before {
position: absolute;
top: 10px;
left: 10px;
width: 6px;
height: 6px;
content: '';
border-radius: 10px;
}
.cp_tag01 a::after {
position: absolute;
top: -2px;
right: -6px;
width: 0;
height: 0;
content: '';
border-width: 15px 0 15px 8px;
border-style: solid;
border-color: transparent transparent transparent #cfd8dc;
border-radius: 4px;
}
.cp_tag01 a:hover {
color: #ffffff;
background-color: #ec407a;
}
.cp_tag01 a:hover::after {
border-left-color: #ec407a;
}
<ul class="cp_tag02">
<li><a href="#">Dog</a></li>
<li><a href="#">Cat</a></li>
<li><a href="#">Rabbit</a></li>
</ul>
.cp_tag02 {
list-style: none;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.cp_tag02 li {
display: inline-block;
}
.cp_tag02 a {
line-height: 26px;
position: relative;
display: inline-block;
height: 26px;
margin: 0 0px 10px 10px;
padding: 0 20px 0 23px;
-webkit-transition: color 0.2s;
transition: color 0.2s;
text-decoration: none;
color: #ffffff;
border-radius: 0 3px 3px 0;
background: #0089e0;
}
.cp_tag02 a::before, .cp_tag02 a::after {
background: #fafcfc;/*背景色*/
}
.cp_tag02 a::before {
position: absolute;
top: 10px;
left: 3px;
width: 6px;
height: 6px;
content: '';
border-radius: 10px;
}
.cp_tag02 a::after {
position: absolute;
top: -1px;
left: -6px;
width: 0;
height: 0;
content: '';
border-style: solid;
border-width: 14px 8px 14px 0;
border-color: transparent #0089e0 transparent transparent;
border-radius: 4px;
}
.cp_tag02 a:hover {
background: #555555;
}
.cp_tag02 a:hover:after {
border-color: transparent #555555 transparent transparent;
}
<ul class="cp_tag03">
<li><a href="#">Dog<span>4</span></a></li>
<li><a href="#">Cat<span>108</span></a></li>
<li><a href="#">Rabbit<span>15</span></a></li>
</ul>
.cp_tag03 {
margin: 0;
padding: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.cp_tag03 li {
position: relative;
display: inline-block;
margin: 0 20px 8px 20px;
list-style: none;
}
.cp_tag03 a, .cp_tag03 span {
display: block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.cp_tag03 a {
line-height: 25px;
height: 26px;
padding: 0 13px 0 10px;
text-decoration: none;
color: #ffffff;
border-style: solid;
border-width: 1px 0 1px 1px;
border-color: #00BCD4 #fafafa #00ACC1 #0097a7;
border-radius: 50px 0 0 50px;
background: #26c6da;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
}
.cp_tag03 a::after {
position: absolute;
z-index: 2;
top: 10px;
right: -1px;
content: '';
opacity: 0.95;
display: inline-block;
width: 0;
height: 0;
border-style: solid;
border-width: 3px;
border-radius: 10px 0 0 10px;
border-color: #fafafa;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out;
}
.cp_tag03 a:hover:after {
border-color: #FF7043;
}
.cp_tag03 span {
font-size: 0.8em;
line-height: 25px;
position: absolute;
top: 0;
left: 100%;
overflow: hidden;
height: 26px;
max-width: 40px;
padding: 0 7px 0 6px;
color: #555555;
border-width: 1px 1px 1px 0;
border-style: solid;
border-color: #dadada #d2d2d2 #c5c5c5;
border-radius: 0 12px 12px 0;
background: #fafafa;
text-shadow: 0 1px #ffffff;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out;
}
.cp_tag03 li:hover span {
color: #ffffff;
border-color: #FF7043 #FF5722 #D84315;
background: #FF7043;
text-shadow: 0 1px #FF7043;
}
<ul class="cp_tag04">
<li><a href="#">Dog<span>4</span></a></li>
<li><a href="#">Cat<span>108</span></a></li>
<li><a href="#">Rabbit<span>15</span></a></li>
</ul>
.cp_tag04 {
margin: 0;
padding: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.cp_tag04:before, .cp_tag04:after {
display: table;
content: '';
}
.cp_tag04:after {
clear: both;
}
.cp_tag04 li {
position: relative;
display: inline-block;
margin: 0 30px 8px 10px;
list-style: none;
}
.cp_tag04 li:active {
margin-top: 1px;
margin-bottom: 7px;
}
.cp_tag04 li:after {
position: absolute;
z-index: 2;
top: 7px;
right: -0.9px;
content: '';
opacity: 0.95;
display: inline-block;
width: 0;
height: 0;
border-style: solid;
border-width: 6px 6px 6px 0;
border-color: transparent #7E57C2 transparent transparent;
}
.cp_tag04 a, .cp_tag04 span {
display: block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.cp_tag04 a {
line-height: 23px;
height: 26px;
padding: 0 9px 0 8px;
text-decoration: none;
color: #555555;
border-width: 1px 0 1px 1px;
border-style: solid;
border-color: #dadada #d2d2d2 #c5c5c5;
border-radius: 3px 0 0 3px;
background: #fafafa;
text-shadow: 0 1px white;
}
.cp_tag04 a:hover span {
max-width: 40px;
padding: 0 7px 0 6px;
}
.cp_tag04 span {
font-size: 0.8em;
line-height: 21px;
position: absolute;
z-index: 2;
top: 1px;
left: 100%;
overflow: hidden;
max-width: 0;
height: 24px;
padding: 0 0 0 2px;
-webkit-transition: 0.3s ease-out;
transition: 0.3s ease-out;
-webkit-transition-property: padding, max-width;
transition-property: padding, max-width;
opacity: 0.9;
color: #ffffff;
border: 1px solid;
border-color: #7E57C2 #673AB7 #512DA8 #7E57C2;
border-radius: 0 2px 2px 0;
background: #7E57C2;
text-shadow: 0 -1px rgba(0, 0, 0, 0.3);
}
<ul class="cp_tag05">
<li><a href="#"><span class="text">Dog</span><span class="count">15</span></a></li>
<li><a href="#"><span class="text">Cat</span><span class="count">15</span></a></li>
<li><a href="#"><span class="text">Rabbit</span><span class="count">15</span></a></li>
</ul>
.cp_tag05 {
margin: 0;
padding: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.cp_tag05 li {
position: relative;
display: inline-block;
margin: 0 10px 8px 10px;
list-style: none;
}
.cp_tag05 a {
position: relative;
display: inline-block;
height: auto;
margin: 0.5em 0 0.5em 20px;
-webkit-transition: margin 500ms ease-in-out;
transition: margin 500ms ease-in-out;
text-align: center;
text-decoration: none;
color: #666666;
}
.cp_tag05 .text {
position: relative;
z-index: 4;
height: 26px;
padding: 5px 15px;
border-width: 1px 3px 1px 1px;
border-style: solid;
border-color: #dadada #E91E63 #d2d2d2 #c5c5c5;
border-radius: 3px 0 0 3px;
background: #ffffff;
}
.cp_tag05 a::after {
position: absolute;
top: -1px;
right: 4px;
z-index: 99;
display: inline-block;
height: 114%;
content: '';
border-right: 1px solid #E91E63;
}
.cp_tag05 .count {
font-size: 0.8em;
line-height: 26px;
position: absolute;
z-index: 3;
top: -1px;
right: -9px;
display: block;
width: 45px;
height: 26px;
padding-right: 5px;
-webkit-transition: right 500ms ease-in-out;
transition: right 500ms ease-in-out;
color: #ffffff;
background: #f06292;
}
.cp_tag05 .count::before, .cp_tag05 .count::after {
position: absolute;
z-index: 1;
top: 0;
right: 0;
display: block;
width: 0;
height: 0;
content: '';
}
.cp_tag05 .count::after {
z-index: 2;
right: -1px;
display: inline-block;
width: 0;
height: 0;
border-style: solid;
border-width: 13px 8px 13px 0;
border-color: transparent #fafcfc transparent transparent;/*背景色*/
}
.cp_tag05 a:hover {
margin-right: 30px;
}
.cp_tag05 a:hover .count {
right: -40px;
}