* {
    padding: 0px;
    margin: 0px;
}

.tab {
    width: 100%;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(227, 227, 227);
    position: fixed;
    bottom: 0px;
}

.tabbar {
    position: relative;
    width: 350px;
    height: 50px;
}

.tabbar ul {
    display: flex;
    justify-content: space-between;
}

.tabbar ul li {
    list-style: none;
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1;
}

.tabbar ul li a {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: rgb(0, 0, 0);
    text-align: center;
}

.tabbar ul li a .icon {
    line-height: 50px;
    font-size: 30px;
    /* 设置过度时间 */
    transition: 0.5s;
}

.tabbar ul li a .text {
    position: absolute;
    font-size: 12px;
    bottom: 13px;
    /* 设置过度时间 */
    transition: 0.5s;
    /* 设置默认隐藏 */
    transform: scale(0);
}

.tabbar ul .active a .icon {
    font-size: 23px;
    /* 图标上移 */
    transform: translateY(-10px);
}

.tabbar ul .active a .text {
    /* 选中，文字显示 */
    transform: scale(1);
}

.active-bg {
    position: absolute;
    left: 0;
    top: 0px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* --c,--cc为css中自定义属性，通过var函数可以对其调用 */
    background-color: var(--c);
    box-shadow: 0 10px 15px var(--cc);
    transition: 0.5s;
}

.tabbar ul li a .icon .tab_img_yes {
    /* 设置未选中后图片大小 */
    width: 15px;
    height: 15px;
}

.tabbar ul .active a .icon .tab_img_yes {
    /* 设置选中后图片大小 */
    width: 20px;
    height: 20px;
}


/* 分别为每一个 active-bg设置颜色，阴影 ，位移*/

.tabbar ul li:nth-child(1).active~.active-bg {
    --c: #ffa502;
    --c: #ffa50299;
    left: 0;
}

.tabbar ul li:nth-child(2).active~.active-bg {
    --c: #ff6348;
    --c: #ff634899;
    left: calc(1*100px);
}

.tabbar ul li:nth-child(3).active~.active-bg {
    --c: #2ed573;
    --c: #2ed57399;
    left: calc(2*100px);
}

.tabbar ul li:nth-child(4).active~.active-bg {
    --c: #1e90ff;
    --c: #1e90ff99;
    left: calc(3*100px);
}

.tabbar ul li:nth-child(5).active~.active-bg {
    --c: #ff6b81;
    --c: #ff6b8199;
    left: calc(4*100px);
}