首先看看需求,tab栏上的一个active样式
//找到active时的选择器 .active::before { content: ''; width: 100%; height: 6px; background-color: green; display: inline-block; position: absolute; left: 0; top: -1px; transform: perspective(125px) rotateX(135deg); }
可以根据自己的样式调整角度及高度