Bootstrap circle buttons
by Ondrej
HTML
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="//code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- FOR DEMO PURPOSE-->
<section>
<div class="container-fluid p-5 text-center">
<!-- FOR DEMO PURPOSE -->
<div class="row mb-5">
<div class="col-lg-5 mx-auto">
<h1 class="font-weight-bold">Circle Buttons</h1>
<p class="text-muted">Create your own circle buttons with icons in Bootstrap 4. <a href="https://bootstrapious.com/snippets" class="text-muted">Bootstrap snippet by Bootstrapious</a></p>
</div>
</div>
<!-- END -->
<div class="row align-items-stretch">
<div class="col-lg-5 mb-4">
<div class="bg-white p-4 rounded shadow-sm h-100">
<h4 class="mb-4">Small circle buttons</h4>
<!-- sm circle button-->
<button class="btn btn-success btn-circle btn-circle-sm m-1"><i class="fa fa-check"></i></button>
<button class="btn btn-primary btn-circle btn-circle-sm m-1"><i class="fa fa-cog"></i></button>
<button class="btn btn-info btn-circle btn-circle-sm m-1"><i class="fa fa-paper-plane"></i></button>
<button class="btn btn-warning btn-circle btn-circle-sm m-1"><i class="fa fa-tags"></i></button>
<button class="btn btn-danger btn-circle btn-circle-sm m-1"><i class="fa fa-sliders"></i></button>
<button class="btn btn-dark btn-circle btn-circle-sm m-1"><i class="fa fa-search"></i></button>
<button class="btn btn-secondary btn-circle btn-circle-sm m-1"><i class="fa fa-wrench"></i></button>
<button class="btn btn-light btn-circle btn-circle-sm m-1"><i class="fa fa-bar-chart"></i></button>
</div>
</div>
<div...
CSS
/*
*
* ==========================================
* CUSTOM UTIL CLASSES
* ==========================================
*
*/
.btn-circle {
width: 45px;
height: 45px;
line-height: 45px;
text-align: center;
padding: 0;
border-radius: 50%;
}
.btn-circle i {
position: relative;
top: -1px;
}
.btn-circle-sm {
width: 35px;
height: 35px;
line-height: 35px;
font-size: 0.9rem;
}
.btn-circle-lg {
width: 55px;
height: 55px;
line-height: 55px;
font-size: 1.1rem;
}
.btn-circle-xl {
width: 70px;
height: 70px;
line-height: 70px;
font-size: 1.3rem;
}
/*
*
* ==========================================
* FOR DEMO PURPOSES
* ==========================================
*
*/
body {
background: #f8f8fd;
color: #514B64;
min-height: 100vh;
}