How to create an on/off switch with Javascript/CSS?

前端 未结 7 478
长情又很酷
长情又很酷 2020-12-04 09:41

I want to have a sliding switch. On the left would be Off and on the right would be On. When the user toggles the switch, I want the \'slider\' portion to slide to the other

7条回答
  •  情深已故
    2020-12-04 09:55

    check out this generator: On/Off FlipSwitch

    you can get various different style outcomes and its css only - no javascript!

提交回复
热议问题