﻿/* 开关容器 */
.switch-wrapper {
     width:120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.switch-label {
    font-size: 14px;
    color: #555;
    font-weight:bold
}

/* 开关核心样式 */
.switch {
    zoom:0.8;
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

    /* 隐藏原生复选框 */
    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

/* 开关滑块 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
}

    /* 开关按钮 */
   .slider:before {
        position: absolute;
        content: "";
        height: 22px;
        width: 22px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

/* 开启状态样式 */
input:checked + .slider {
    background-color: #2196F3;
}

    input:checked + .slider:before {
        transform: translateX(30px);
   }
      