这是 参考别人的思路和想法https://blog.csdn.net/g229191727/article/details/80731527
下面是自己写的
.content-top {
display: flex;
border-bottom: 1rpx solid #f8f9fa;
padding-bottom: 20rpx;
}
.content-top-item {
flex: 1;
text-align: center;
font-size: 30rpx;
color: #1a2031;
position: relative;
}
.content-top-item.active {
color: #ff643a;
}
.content-top-item::before {
position: absolute;
content: ' ';
bottom: -20rpx;
width: 100%;
left: 100%;
text-align: left;
}
.content-top-item.active ~ .content-top-item::before {
left: -100%;
}
.content-top-item.active::before {
border-top: 1rpx solid #ff643a;
left: 0;
tr