CSS Border-Radius Property

CSS 1

CSS 2

CSS 3

No No Yes

Description

The ‘border-radius’ shorthand sets all four ‘border-*-radius’ properties. If values are given before and after the slash, then the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, then the values set both radii equally. The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left.

Syntax

border-radius: [length] [length]...

Possible values

  • [length]

Initial Value

0

Applies To

All elements

Inherited

No

Media

Visual

Example

.class {
  border-radius: 2em, 1em, 4em, 3em;
}


View All CSS Properties