There was a nice button created by btn-default
in Bootstrap 3.
<a class="btn btn-default">link</a>
Is there an equivalent in Bootstrap 4?
The btn-outline-secondary
class and btn-outline-light
class in Bootstrap 4 are the 2 closest alternatives to what used to be btn-default
in Bootstrap 3. (there's no exact equivalent in Bootstrap 4)
Here's a code snippet with live preview (notice the difference between a button
and an a
tag):
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container m-3">
<a class="btn btn-outline-secondary">outline-secondary link</a>
<button type="button" class="btn btn-outline-secondary">outline-secondary 'button'</button>
<br><br>
<a class="btn btn-outline-light">outline-light link</a>
<button type="button" class="btn btn-outline-light">outline-light 'button'</button>
</div>
Reference:
https://getbootstrap.com/docs/4.0/components/buttons/#outline-buttons
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With