Bootstrap 4 .rounded-circle class


To create a rounded circle with Bootstrap, use the rounded-circle class.

Add the rounded-circle class in the <div>

<div class="test rounded-circle">
</div>

Above, we also have a test class, which is a CSS class to style the circle −

.test {
  width: 270px;
  height: 320px;
  background-color: yellow;
}

You can try to run the following code to implement the rounded-circle class in Bootstrap 4 −

Example

Live Demo

<!DOCTYPE html>
<html>
  <head>
   <title>Bootstrap Example</title>
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
   <style>
    .test {
      width: 350px;
      height: 320px;
      background-color: yellow;
    }
   </style>
  </head>
<body>
  <div class="container">
    <h2>Circle</h2>
    <p>We have a circle below:</p>
    <div class="test rounded-circle"></div>
  </div>
</body>
</html>

Updated on: 15-Jun-2020

7K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements