How to Create Rounded Corners using CSS

In this article, you will learn How to Create Rounded Corners using CSS. You can also make a circle shape with this property.

Example:

<html>
<head>
<title>Rounded corners</title>
<style> 
.corners1 {
  border-radius: 50px / 15px;
  background: #73AD21;
  padding: 20px; 
  width: 200px;
  height: 150px; 
}
.corners2 {
  border-radius: 15px 50px 15px 50px;
  background: #73AD21;
  padding: 20px; 
  width: 200px;
  height: 150px; 
}
.corners3 {
  border-radius: 50%;
  background: #73AD21;
  padding: 20px; 
  width: 200px;
  height: 150px;
} 
</style>
</head>
<body>
<h1>Border-radius Property</h1>
<p>border-radius: 50px / 15px:</p>
<div class="corners1"></div>
<p>border-radius: 15px 50px 15px 50px:</p>
<div class="corners2"></div>
<p>border-radius: 50%:</p>
<div class="corners3"></div>
</body>
</html>

1 Comment

  • Lucile

    September 11, 2020 - 7:07 pm

    Hi there to every one, because I am really eager of reading this website’s post to be updated
    daily. It contains pleasant information.

Leave A Reply