Switch by The-Best-Codes
#e8e8e8
1.toggle-switch { 2 display: inline-block; 3 position: relative; 4 width: 60px; 5 height: 34px; 6} 7 8.toggle-input { 9 display: none; 10} 11 12.toggle-label { 13 position: absolute; 14 top: 0; 15 left: 0; 16 width: 60px; 17 height: 34px; 18 background-color: #ccc; 19 border-radius: 34px; 20 cursor: pointer; 21 transition: background-color 0.3s; 22} 23 24.toggle-label:before { 25 content: ""; 26 position: absolute; 27 top: 2px; 28 left: 2px; 29 width: 30px; 30 height: 30px; 31 background-color: #fff; 32 border-radius: 50%; 33 transition: transform 0.3s; 34} 35 36.toggle-input:checked + .toggle-label { 37 background-color: #4fbf26; 38} 39 40.toggle-input:checked + .toggle-label:before { 41 transform: translateX(26px); 42} 43
410 views
410 views
The-Best-Codes 26. October 2023. at 22:13
26. October 2023. at 22:13
Yay! Approved!
MIT License