CSS border-top-right-radius Property

Description

The border-top-right-radius CSS property is used to define the curvature or roundedness of the top-right corner of an element, typically a box or a container, in a web page layout. It allows web developers to create visually appealing designs by specifying a radius value, which determines the size of the quarter-circle that defines the corner's curve. This property is part of the broader border-radius property and can be used in combination with other corner radius properties to control the roundness of specific corners, giving web designers fine-grained control over the element's appearance.

Initial value
0
Applies to
All elements
Inherited
No
Computed value
Two absolute [length] or percentages
Animatable
Yes
JavaScript syntax
object.style.borderTopRightRadius

Interactive Demo

Demo of the border top right radius property.

Syntax

border-top-right-radius: [ <length> | <percentage> ]{1,2} 

Values

  • <length>Denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipsis. It can be expressed in any unit allowed by the CSS <length> data types. Negative values are invalid.
  • <percentage>Denotes the size of the circle radius, or the semi-major and semi-minor axes of the ellipsis, using percentage values. Percentages for the horizontal axe refer to the width of the box, percentages for the vertical axe refer to the height of the box. Negative values are invalid.

Example

<div class="border">This is an example of the border-top-right-radius property using a red solid border 2px in width and a 10px radius.</div>
.border {
   border: 2px solid red;
   border-top-right-radius: 10px;
   margin: 20px;
   padding: 20px;
}

Browser Support

The following table will show you the current browser support for the CSS border-top-right-radius property.

Desktop
Edge Chrome Firefox Opera Safari
124410.55
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
184114.2137

Last updated by CSSPortal on: 31st December 2023