tabbar.wxss 1.01 KB
.tabbar {
    height: 102rpx;
    line-height: 102rpx;
    box-sizing: border-box;
    border-bottom: 1rpx solid #eee;
    background-color: #fff;
}

.flex {
    display: flex;
}

.tabbar-item {
    float: left;
    margin-right: 80rpx;
    font-size: 32rpx;
    color: #333;
    position: relative;
    font-weight: 600;
}

.tabbar-item .item {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.flex .tabbar-item {
    flex: 1;
    text-align: center;
    margin-right: 0;
}

.tabbar-item:last-of-type {
    margin-right: 0;
}

.tabbar-item.active,.tabbar-line {
    position: relative;
}

.tabbar-line:before {
    content: "";
    position: absolute;
    top: 50%;
    right: -1rpx;
    transform: translateY(-50%);
    width: 1rpx;
    height: 62rpx;
    background-color: hsla(0,0%,77.6%,.2);
}

.tabbar-item.active .item:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4rpx;
    background-color: #ff7d12;
}