假设容器的active类名为is-active,那么可以通过伪元素的方式来给容器打标。效果如下:
样式如下:
.is-active{
position: relative;
}
.is-active::after {
content:"";
position: absolute;
right: 0;
top: 0;
border-right: 20px solid #0A53C8;
border-top: 20px solid #0A53C8;
border-left: 20px solid transparent;
border-bottom: 20px solid transparent;
width: 0;
height: 0;
}
.is-active::before {
content: "\e6da";
font-family: element-icons !important;
color: #fff;
font-size: 20px;
font-weight: bold;
position: absolute;
right: 0px;
top: 0px;
z-index: 9;
}