CustomTabBar.wxss 1.19 KB
/* components/TabBar/TabBar.wxss */
.tab-bar{
  position: fixed;
  left: 0;
  background-color: #fff;
  z-index: 99;
  width: 100%;
  height: var(--fontSize100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fontSize20);
  animation: show-tab-bar .5s forwards;
  border-top: var(--fontSize1) solid #F4F4F5;
  padding-bottom: constant(safe-area-inset-bottom) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
}
.tab-bar .item{
  flex: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all .5s;
}
.tab-bar .item .icon-box{
  width: var(--fontSize48);
  height: var(--fontSize48);
  margin-bottom: var(--fontSize8);
}
.tab-bar .item .icon-box .active-icon{
  animation: showicon .5s forwards;
}
@keyframes show-tab-bar {
 0%{
   bottom: -100%;
 }   
 100%{
   bottom: 0;
 }
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
  .tab-bar{
    height: var(--fontSize70);
    font-size: var(--fontSize16);
  }
  .tab-bar .item .icon-box{
    width: var(--fontSize32);
    height: var(--fontSize32);
    margin-bottom: var(--fontSize4);
  }
}