What is border-radius property in CSS?

The border-radius property is used to round corners of elements.

Syntax

The border-radius property can have one to four values. These values can be in:

  • pixels
  • percentage
  • em
  • CSS (SCSS)
Values in px and Percentage
  • CSS (SCSS)
Values in em(em is relative to font size)

Making elliptical shapes

Border-radius is also used to make elliptical shapes by specifying the horizontal and vertical radii of elements.

It is done by using '/' between two values.

The value is set to initial to get the default value of the property.

  • CSS (SCSS)
Examples using ' / '
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources