.slideswitch {
  position: absolute;
  margin-left: -9999px;
  visibility: hidden;
}
.slideswitch + label {
  display: block;
  position: relative;
  cursor: pointer;
  outline: none;
  user-select: none;
}

input.slideswitch + label {
  padding: 2px;
  width: 60px;
  height: 120px;
  background-color: #dddddd;
  border-radius: 60px;
}
input.slideswitch + label:before, 
input.slideswitch + label:after {
  display: block;
  position: absolute;
  top: 1px;
  left: 1px;
  bottom: 1px;
  content: "";
}
input.slideswitch + label:before {
  right: 1px;
  background-color: #f1f1f1;
  border-radius: 60px;
  transition: background 0.2s;
}
input.slideswitch + label:after {
  width: 58px;
  height: 58px;
  background-color: #fff;
  border-radius: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: margin 0.2s;
  margin-top: 60px;
}
input.slideswitch:checked + label:before {
  background-color: green;
}
input.slideswitch:checked + label:after {
  margin-top: 0px;
}
