Try It

Rounded Corners
Circle
Elliptical Shape
Pill Shape
Rounded Top Corners
Rounded Bottom Corners
Complex Shapes

Currently Active Property:

border-radius: 10px;

Syntax:  

border-radius: 1-4 length|% / 1-4 length|%|initial|inherit;

Property Values:

  • length: It represents the shape of the corners & the default value is 0.
  • percentage(%): It represents the shape of the corners in %.
  • initial: It is used to set an element’s CSS property to its default value.
  • inherit: It is used to inherit a property to an element from its parent element property value.

Shorthands:

  • Apply Radius value to all four corners:
border-radius: value; 
  • Apply value1 to top-left and bottom-right corners and value2 to top-right and bottom-left corners:
border-radius: value1 value2; 
  • Apply value1 to top-left corner, value2 to top-right and bottom-left corners and value3 to bottom-right corner:
border-radius: value1 value2 value3; 
  • Apply value1 to top-left corner, value2 to top-right corner , value3 to bottom-right corner and value4 to bottom-left corner:
border-radius: value1 value2 value3 value4;

The 4 values for each radius can be specified in the following order as top-left, top-right, bottom-right, bottom-left. If the bottom-left is removed then it will be the same as the top-right. Similarly, If the bottom-right & top-right will be removed then it will be the same as the top-left & the top-left respectively.

CSS border-radius Property

CSS border radius is used to round the corners of the outer border edges of an element. This property can contain one, two, three, or four values. The border-radius property is used to set the border-radius. This property is not applicable to the table elements when border-collapse is collapsing.

Similar Reads

Try It:

.item { border: 1px solid gray; font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; border-radius: 3px; margin: auto; margin-top: 5px; max-width: 320px; min-width: 150px; width: 80%; cursor: pointer; background-color: rgb(133, 173, 179); color: rgb(255, 255, 255); font-weight: 600; letter-spacing: 1.5px; padding: 5px; font-size: 13px; } .item:hover { box-shadow: 0 0 2px grey; } .active { background-color: rgb(57, 149, 163); } @media screen and (max-width: 450px) { .container { flex-direction: column; } .snippets { border-right: none !important; border-bottom: 2px solid; width: 100% !important; padding-bottom: 10px; } .output { padding: 10px 0; } }...

CSS Border Radius Examples

border-radius: 35px; sets the border-radius of each corner. It is the combination of four properties: border-top-left-radius, border-top-right-radius, border-bottom-left-radius, and border-bottom-right-radius. It sets all corners to the same value....