﻿/**
 * 简单的开关插件
 * @date 2016-06-25
 */
.simple-switch {
    width: 70px;
    height: 32px;
    border: solid 2px #ddd;
    border-radius: 30px;
    background-color: #FFF;
    position: relative;
    padding-left: 28px;
    -webkit-transition: background-color 0.3s;
    transition: background-color 0.3s;
    -webkit-user-select: none;
    font-size: 14px;
}

.simple-switch > input[type="checkbox"] {
    display: none;
}

.simple-switch:before {
    content: 'Off';
    text-align: center;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 28px;
    color: #999;
}

.simple-switch > .switch-handler {
    position: absolute;
    left: 2px;
    top: 0px;
    width: 28px;
    height: 28px;
    background-color: #FFF;
    border-radius: 50%;
    -webkit-box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.52);
    box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.52);
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.simple-switch.active {
    border-color: #1ab394;
    background-color: #1ab394;
    padding-left: 0;
    padding-right: 28px;
}

.simple-switch.active:before {
    content: 'On';
    color: #FFF;
}

.simple-switch.active > .switch-handler {
    left: 38px;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box
}

:before, :after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box
}

input[type="button"] {
    background-color: #FFF;
    border: solid 1px #8E8E8E;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 5px;
    font-size: 14px;
}

.switch_interval {
    width: 70px;
    height: 32px;
    border-radius: 10px;
    outline: none;
    border: solid 2px #ddd;
    background-color: #FFF;
    text-align: right;
    font-size: 14px;
}