Comment mettre un lien en forme de bouton avec bootstrap

Active 16 février 2018    /    Viewed 8946    /    Comments 0    /    Edit


Pour avoir un simple lien qui ressemble à un bouton sur bootstrap, on peut utiliser la syntaxe suivante:

<a href="" class="btn btn-info">link</a>

Comment mettre un lien en forme de bouton avec bootstrap

illustration

<!DOCTYPE html>
<html lang="en">
<head>

  <title>Bootstrap Example</title>

  <meta charset="utf-8">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

  <style>
  body {
  padding-top: 50px;
  background-color:#FFFFF; 
  }
  </style>

</head>
<body>


<div class="container">

<div class="row">
<div class="col-md-4">

<a href="https://www.w3schools.com/html/html_links.asp">link 1</a>

<br><br>

<a href="https://www.w3schools.com/html/html_links.asp" class="btn btn-info">link 2</a>

<br><br>

<a href="https://www.w3schools.com/html/html_links.asp" class="btn btn-default">link 3</a>

<br><br>

<a href="https://www.w3schools.com/html/html_links.asp" class="btn btn-success">link 3</a>

</div>
</div>
</div>

</body>
</html>

Références

Liens Site
How to make link look like a button? stackoverflow
buttons bootstrap
link w3schools


Card image cap
profile-image
Daidalos

Hi, I am Ben.

I have developed this web site from scratch with Django to share with everyone my notes. If you have any ideas or suggestions to improve the site, let me know ! (you can contact me using the form in the welcome page). Thanks!