<label class="switch"> <input type="checkbox"> <div class="slider"> <span>On</span> <span>Off</span> </div> </label>
.switch { font-size: 17px; position: relative; display: inline-block; width: 100px; height: 2em; } .slider { position: absolute; cursor: pointer; top: 0;