.nav-wrap { display: flex; align-items: center; width: 100%; border-bottom: 1rpx solid rgba(189, 189, 189, 1); } .nav { width: 50%; padding: 24rpx 0; line-height: 40rpx; font-size: 28rpx; color: rgba(51, 51, 51, 1); text-align: center; &.active { position: relative; left: 0; top: 0; color: rgba(145, 179, 121, 1); &:after { position: absolute; left: 50%; bottom: 0; content: ''; width: 162rpx; height: 8rpx; border-radius: 40rpx 40rpx 0 0; background: rgba(145, 179, 121, 1); transform: translateX(-50%); } } }