Explanation:
The example above uses Bootstrap's built-in classes along with the Font Awesome icon library for the icon:
btn
: This class is used to style the button in Bootstrap.btn-primary
: This is the button color class (you can change it to any otherbtn-*
class, likebtn-secondary
,btn-success
, etc.).i
tag withfa-solid fa-house-chimney
: This adds the icon inside the button using Font Awesome.- The custom CSS class
.btn-demo
(see the CSS code below) is used to make the button appear rounded.
HTML
<a href="#" class="btn btn-secondary btn-lg btn-demo" role="button"><i class="fa-solid fa-house-chimney"></i></a>
Font Awesome CSS
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
CSS
.btn-demo {
width: 40px;
height: 40px;
font-size: 1em;
border-radius: 100%;
padding: 8px;
text-align: center;
border: 1px solid #ffffff;
outline: 1px solid rgba(255, 255, 255, 0.60);
outline-offset: 4px;
}
Basic Page
Button alignment
Button styles
Button with icon Only
Button with text and icon on the left
Button with text and icon on the right
Content pagination
Include CSS and JS Files
Modal window
Popover
Popover with HTML content
Progress bars
Progress bars with tooltip
Popover with HTML content and a close button
Responsive cards
Responsive cards styled like business cards
Responsive cards styled like post-it notes
Responsive columns
Table
Table pagination with keyboard keys
Tabs
Tooltip
Tooltip with HTML content