.onoffswitch {
    position: relative; width: 48px;
    -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 2px;
}
.onoffswitch-label {
    display: block; overflow: hidden; cursor: pointer;
    height: 17px; padding: 0; line-height: 17px;
    border: 2px solid #E3E3E3; border-radius: 22px;
    background-color: #FFFFFF;
    transition: background-color 0.3s ease-in;
}
.onoffswitch-label:before {
    content: "";
    display: block; width: 17px; margin: 0px;
    background: #FFFFFF;
    position: absolute; top: 0; bottom: 0;
    right: 28px;
    border: 2px solid #E3E3E3; border-radius: 30px;
    transition: all 0.3s ease-in 0s; 
}
.onoffswitch-checkbox:checked + .onoffswitch-label {
    background-color: #42A5F5;
}
.onoffswitch-checkbox:checked + .onoffswitch-label, .onoffswitch-checkbox:checked + .onoffswitch-label:before {
	border-color: #42A5F5;
 }
 .onoffswitch-checkbox:checked + .onoffswitch-label:before {
	 right: 0px; 
 }