switchBlock.wxss 1008 Bytes
/* components/switchBlock/switchBlock.wxss */
.switch-box {
    width: 236rpx;
    height: 60rpx;
    display: flex;
    border: 2rpx solid #3582EE;
    border-radius: 12rpx;
    font-size: 28rpx;
    color: #3582EE;
    margin-left: auto;
    position: relative;
  }
.text-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

  .switch-box .block {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    border-radius: 12rpx;
    height: 100%;
    background: #3582EE;
    color: #fff;
    transition: all .25s;
  }
  
  .switch-box .block.right {
    left: 50%;
  }
  
  .switch-box .male,
  .switch-box .woman {
    width: 50%;
    height: 100%;
    position: absolute;
    top: 0;
    transition: all .25s;
  }
  
  .switch-box .male {
    left: 0;
  }
  
  .switch-box .woman {
    right: 0;
  }
  .switch-box .male.active,
  .switch-box .woman.active{
    color: #fff;
  }
  .disabled{
    opacity: .5;
  }