Tab.wxss 1.36 KB
/* components/Tab/Tab.wxss */

.tab-box {
  display: flex;
  /* display: grid; */
  width: 100%;
  height: 92rpx;
  box-sizing: border-box;

}

.tab-box.left {
  padding-left: 32rpx;
}

.left .tab {
  padding-right: 40rpx;
}

/* .flex .tab {
  flex: 1;
} */
.tab {
  position: relative;
  flex-shrink: 0;
}

.tab .text {
  height: 84rpx;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  /* color: #A9A9A9; */
  font-size: 32rpx;
  color: #8A8C90;
  justify-content: center;
}

.left .text {
  justify-content: flex-start;
}

.flex .tab .text {
  padding: 0;
}

.tab.active .text {
  /* font-weight: 500; */
  /* font-weight: 600; */
  font-size: 44rpx;
  transition: all .25s;
  font-weight: 500;
  font-size: 32rpx;
  color: #3666FE;
  font-family: PingFangSC-S0pxibold;
}

.tab .line {
  width: 120rpx;
  height: var(--borderRadius);
  background: var(--btnColor);
  border-radius: 2rpx;
  margin: 0 auto;
  transform: scale(0);
  transition: all .25s;
}

.tab.active .line {
  transform: scale(1);
}

.tab-box::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  color: transparent;
}

/* 外部出进来的自定义样式 */
.project-tab {
  padding-left: 20px;
  padding-right: 20px;
}

.project-tab .tab {
  margin-right: 28px;
}

.project-tab .tab.active .text {
  font-size: 28rpx;
  color: var(--btnColor);
}

.project-tab .tab .line {
  width: auto;
}