首先看看需求,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); }
可以根據自己的樣式調整角度及高度