How do you create a toggle button?

后端 未结 15 2973
名媛妹妹
名媛妹妹 2020-11-27 11:46

I want to create a toggle button in html using css. I want it so that when you click on it , it stays pushed in and than when you click it on it again it pops out.

15条回答
  •  情话喂你
    2020-11-27 12:10

    If you want a proper button then you'll need some javascript. Something like this (needs some work on the styling but you get the gist). Wouldn't bother using jquery for something so trivial to be honest.

    
    
    
    
    
    
    
    
    
    
    
    
    

提交回复
热议问题