.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 20px;
}

.switch input {display:none;}

.switch_slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #000;
  -webkit-transition: .4s;
  transition: .4s;
   border-radius: 20px;
}

.switch_slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #ffed00;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .switch_slider {
  background-color: #000;
}

input:focus + .switch_slider {
  box-shadow: 0 0 1px #2196F3;
}

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

/*------ ADDED CSS ---------*/
.switch_slider:after
{
 content:'OFF';
 color: white;
 display: block;
 position: absolute;
 top: 5px;
 left: 30px;
 font-size: 10px;
}

input:checked + .switch_slider:after
{  
  content:'ON';
   left: 5px;
}

/*--------- END --------*/