.ct-switch {
    display: inline-block;
    position: relative;
    border-radius: 20px;
    border: 1px solid; 
    padding: 2px 5px;
    min-width: 46px;
    height: 20px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    border-color: #ccc;
    background-color: #ccc;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    transition:all .3s ease-in-out;
    -webkit-transition:all .3s ease-in-out;
    .ct-switch__inner {
        padding:  0 4px 0  14px;
        color: #fff;
        transition:all  .3s; 
        -moz-transition:all  .3s; 
    }
    .ct-switch__label {
        position: absolute;
        top: 2px;
        left: 2px; 
        width: 14px;
        height: 14px;
        cursor: pointer;
        border-radius: 100%;
        background: #fff;   
        transition:left .3s ,width .1s ;
        -webkit-transition: left .3s ,width .1s ;
        &.loading-icon {
            &::after {
                animation: rotate 1.5s linear infinite;
                -webkit-animation : rotate 1.5s linear infinite;
                border-width: 1px;
                border-style: solid;
                border-color: #007aff transparent transparent transparent;
                content: "";
                position: absolute;
                border-radius: 100%;
                width: 10px;
                height: 10px;
                top: 2px;
                left: 2px;
            }
        }        
    }
    &:active {
        .ct-switch__label {
            border-radius: 15px;
            width: 18px;
        }
        &.ct-switch__small {
            .ct-switch__label {
                width: 12px;
            }
        }
        &.ct-switch__large {
            .ct-switch__label {
                width: 24px;
            }
        }
    }
    &.is-active {
        border-color: #007aff;
        background-color: #007aff;
        .ct-switch__label {
            left: auto;
            right: 2px; 
        }
        .ct-switch__inner {
            padding: 0 14px 0 4px;
        }
    }
    //小尺寸
    &.ct-switch__small {
        min-width: 30px;
        height: 16px;
        font-size: 11px;
        line-height: 11px;
        .ct-switch__inner {
            padding:0 4px 0 12px;
        }
        .ct-switch__label {
            width: 10px;
            height: 10px;
            &.loading-icon::after {
                width: 6px;
                height: 6px;
                top: 2px;
                left: 2px;

            }
        }
        &.is-active {
            .ct-switch__inner {
                padding:0 12px 0 4px;
            }
        }
    }
    //大尺寸
    &.ct-switch__large {
        min-width: 58px;
        height: 22px;
        font-size: 14px;
        line-height: 16px;            
        .ct-switch__inner {
                padding:0 5px 0 20px;
            }
        .ct-switch__label {
            width: 16px;
            height: 16px;
            &.loading-icon::after {
                width: 11px;
                height: 11px;
                top: 3px;
                left: 3px;

            }
        }
        &.is-active {
            .ct-switch__inner {
                padding:0 20px 0 5px;
            }
        }
    }
    &.is-loading {
        opacity: .4;
    }
    //禁用
    &.is-disabled {
        cursor: not-allowed;
        opacity: .4;
        &.is-active {
            background-color:#007aff99;
            border-color:#007aff99;
        }
    }

}
