Switch by vinodjangid07
#212121
1#checkbox { 2 display: none; 3} 4 5.switch { 6 position: relative; 7 width: fit-content; 8 padding: 10px 20px; 9 background-color: rgb(46, 46, 46); 10 border-radius: 50px; 11 z-index: 1; 12 cursor: pointer; 13 display: flex; 14 align-items: center; 15 justify-content: center; 16 gap: 10px; 17 color: white; 18 font-size: 0.9em; 19 font-weight: 600; 20 transition: all 0.3s; 21} 22.switch svg path { 23 fill: white; 24} 25#checkbox:checked + .switch { 26 background-color: rgb(174, 0, 255); 27 box-shadow: 0px 0px 40px rgba(174, 0, 255, 0.438); 28} 29
1.8K views
1.8K views
MIT License