<label class="switch"> <input class="cb" type="checkbox" /> <span class="toggle"> <span class="left">off</span> <span class="right">on</span> </span> </label>
.switch { font-size: 17px; position: relative; display: inline-block; width: 5em; height: 2.5em; user-select: none; } .switch .cb { opacity: 0; width: 0;