Styling an anchor tag to look like a submit button

后端 未结 10 1449
谎友^
谎友^ 2020-11-29 04:19

I have a form where there\'s a \"Submit\" button and a \"Cancel\" anchor. The HTML is this:




        
10条回答
  •  北海茫月
    2020-11-29 04:59

    Using a button tag instead of the input, resetting it and put a span inside, you'll then just have to style both the link and the span in the same way. It involve extra markup, but it worked for me.

    the markup:

    
    cancel
    

    the css:

    button[type="submit"] {
        display: inline;
        border: none;
        padding: 0;
        background: none;
    }
    

提交回复
热议问题