1.效果
2.css实现
.item-selected{
font-size: 18px;
font-weight: bold;
color: white;
//给当前元素添加相对定位,也就是after的父级
position: relative;
&:after {
content: " ";
width: 24px;
height: 2px;
background: #FFAA00;
position: absolute;
bottom: -0.1rem;
left: 50%;
transform: translateX(-50%);//居中处理
}
}