.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  top: 17px;
  left: 5px;
}

.switch input {display:none;}

.slider {
  position: absolute;
  cursor: pointer;
  top: 10px;
  left: 0px;
  right: 30px;
  bottom: 10px;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #3F8CBA;
}

input:focus + .slider {
  box-shadow: 0 0 1px #3F8CBA;
}

input:checked + .slider:before {
  -webkit-transform: translateX(16px);
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}