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

前端 未结 7 451
长情又很酷
长情又很酷 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:46

    You can take a look at Shield UI's Switch widget. It is as easy to use as this:

    
    
    
    

提交回复
热议问题