Browser name, version (with -webkit- or -moz- prefix) and version that fully supports the border-radius property.
Property |
Chrome
![]() |
IE/Edge
![]() |
Firefox
![]() |
Safari
![]() |
Opera
![]() |
---|---|---|---|---|---|
border-radius | 4.0 -webkit- 5.0 |
9.0 | 3.0 -moz- 4.0 |
3.1 -webkit- 5.0 |
10.5 |
The property border-radius allows you to define rounded corners for the border of an HTML element. The curvature of each corner is defined with one or two radii of curvature which make it possible to define an arc of a circle or an arc of an ellipse.
CSS code to obtain rounded edges, both through the official property and through the proprietary ones of Webkit and Mozilla.
this template within a style tag of any block-style element:
{{border-radius | radius1 [radius2 radius3 radius4]}}
This property is a shortened property which allows you to define:
CSS Example of border-radius
The property border-radiuscan be defined with:
A single value: A length (type <length>) or percentage (type <percentage>) value that indicates the radius to use for each corner when using a single value in the declaration.
Two values (top left corner and bottom right): A length value (type <length>) or a percentage (type <percentage>) that indicates the radius of curvature to use for the top left corner and the bottom right corner of the border box when using two values in the declaration.
Top right and bottom left corner (two- and three-value syntax): A length (type <length>) or percentage (type <percentage>) value that indicates the radius of curvature to use for the top right corner and the bottom left corner of the border box when using two or three values in the declaration.
Top left corner: A length value (type <length>) or a percentage (type <percentage>) that indicates the radius of curvature to use for the top left corner of the element. This value is used when using syntax with three or four values.
Top right corner: A length value (type <length>) or a percentage (type <percentage>) that indicates the radius of curvature to use for the top right corner of the element. This value is used when using syntax with four values.
Bottom right corner: A length value (type <length>) or a percentage (type <percentage>) that indicates the radius of curvature to use for the bottom right corner of the element. This value is used when using syntax with three or four values.
Bottom left corner: A length value (type <length>) or a percentage (type <percentage>) that indicates the radius of curvature to use for the bottom left corner of the element. This value is used when using syntax with four values.
<length>
This value indicates the measurement of the radius of curvature of the circle or the measurement of the half major axis or the half minor axis of the ellipse translating the curvature. This value can be expressed with the different units of >length>. Negative values are considered invalid.
<percentage>
This value translates the measurement of the radius of curvature (elliptical or circular) expressed in percentages relative to the size of the box. The vertical radii are therefore proportional to the height of the box and the horizontal rays proportional to the width of the box. Negative values are considered invalid.