Can I nest button inside another button?

前端 未结 2 1499
星月不相逢
星月不相逢 2020-11-28 15:55

This is a problem resulting from trying to keep my html semantics as correct as possible.

I have a parent button that does both a function in the same page, and acts

2条回答
  •  被撕碎了的回忆
    2020-11-28 16:31

    You can not do this. A button is not meant to contain other elements. However, you can style a div element to have the look and the feel of a button, here is what it looks like with bootstrap:

    
    
    
        
        
    
    
    
    
    
    
    
    
    
        
    outer button

提交回复
热议问题