How to create an HTML button that acts like a link?

后端 未结 30 3702
长发绾君心
长发绾君心 2020-11-21 04:18

I would like to create an HTML button that acts like a link. So, when you click the button, it redirects to a page. I would like it to be as accessible as possible.

30条回答
  •  后悔当初
    2020-11-21 04:57

    If it's the visual appearance of a button you're looking for in a basic HTML anchor tag then you can use the Twitter Bootstrap framework to format any of the following common HTML type links/buttons to appear as a button. Please note the visual differences between version 2, 3 or 4 of the framework:

    Link
    
    
    
    

    Bootstrap (v4) sample appearance:

    Sample output of Boostrap v4 buttons

    Bootstrap (v3) sample appearance:

    Sample output of Boostrap v3 buttons

    Bootstrap (v2) sample appearance:

    Sample output of Boostrap v2 buttons

提交回复
热议问题