我需要制作一些看起来like this的标签。起初我尝试用普通name
创建一个带有边框技巧的三角形,但似乎不可能制作灰色边框。我想用css
来做这件事,但我从来没有和那些人合作过,而且我有点卡住了。有人能指出我正确的方向吗? .Thanks
SVG
.c-tabs {
background: #fff;
border: 3px solid #e9e9e9;
}
.c-tabs:after,
.c-tabs:before {
display: table;
content: "";
}
.c-tabs:after {
clear: both;
}
.c-tabs__item {
float: left;
width: 25%;
padding: 22px 0;
color: #0b5d98;
font-size: 12px;
text-transform: uppercase;
font-family: nexaBlack, sans-serif;
text-align: center;
cursor: pointer;
position: relative;
}
.c-tabs__item svg:first-of-type {
position: absolute;
left: 0;
top: 0;
}
.c-tabs__item svg:last-of-type {
position: absolute;
right: -23px;
top: -2px;
bottom: -2px;
}
// .c-tabs__item :after {
// content: '';
// position: absolute;
// width: 20px;
// height: 100%;
// top: 0;
// right: 0;
// border-left: 30px solid transparent;
// border-top: 30px solid transparent;
// border-bottom: 30px solid transparent;
// background: #fff;
// z-index: 2;
//// box-shadow: 0 0 0 3px $light-base;
// }
// .c-tabs__item :before {
// content: '';
// position: absolute;
// height: 100%;
// width: 20px;
// height: 100%;
// top: 0;
// right: 0px;
// border-left: 33px solid #e9e9e9;
// border-top: 33px solid transparent;
// border-bottom: 33px solid transparent;
// z-index: 1;
// }
.c-tabs__item--active {
background: #03bfd7;
color: #fff;
box-shadow: inset 0 0 0 3px #03bfd7;
}
.c-tabs__item--active:after {
border-left: 30px solid #03bfd7;
}