<label class="toggle-switch"> <input type="checkbox"> <div class="toggle-switch-background"> <div class="toggle-switch-handle"></div> </div> </label>
.toggle-switch { position: relative; display: inline-block; width: 80px; height: 40px; cursor: pointer; } .toggle-switch input[type="checkbox"] { display: none; }