.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  margin: 0px 10px 0 0;
}

.switch input[type='checkbox'] { 
  opacity: 0;
  width: 0;
  height: 0;
}

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

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

.switch input[type='checkbox']:checked + .slider {
  background-color: #2196F3;
}

.switch .switch input[type='checkbox']:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

.switch input[type='checkbox']:checked + .slider:before {
  -webkit-transform: translateX(16px);
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

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

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