Add top rounded corners to an element in Bootstrap 4

BootstrapWeb DevelopmentCSS Framework

To add top rounded corners to an element, use the rounded-top class in Bootstrap 4.

I have taken div as the element −

<div class="new rounded-top"></div>

Let us learn how to add top rounded corners to an element −


Live Demo

<!DOCTYPE html>
<html lang="en">
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="">
    <script src=""></script>
    <script src=""></script>
    .new {
      width: 80px;
      height: 80px;
      background-color: #EE6D1E;
      margin: 20px;
  <div class="container">
    <h2>Rounded Corner</h2>
    <p>We have a rectangle with top rounded corner:</p>
    <div class="new rounded-top"></div>

Updated on 18-Jun-2020 12:21:30