CSS Portal

CSS border-top-right-radius Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The border-top-right-radius property controls the curvature of the element’s top-right corner by defining how much that corner is rounded instead of forming a sharp right angle. It effectively replaces the corner’s right angle with a smooth arc, altering the element’s outline, the way borders are drawn at that corner, and the silhouette that backgrounds and foreground content can follow. Because it targets a single corner, it gives fine-grained control over an element’s shape when you want asymmetrical rounding or distinct visual styles on different corners.

When multiple corner radii are present they combine to determine the final corner geometry; browsers ensure the arcs fit inside the element’s box and may proportionally scale radii when the combined corner radii would otherwise overflow the element’s dimensions. For managing several corners at once you can use the shorthand border-radius, which groups the four corner radius settings into a single declaration while still allowing individual override by corner-specific properties. Using a single-corner property like border-top-right-radius alongside other corner settings makes it easy to produce pill shapes, cut-corner effects, or bespoke rounded patterns without affecting the other corners.

The visual effect of a rounded corner extends beyond just the border line: backgrounds, box decorations, and hit areas are influenced by that contour. For example, the way a background is painted relative to the rounded edge can be impacted by background-clip, and shadows applied to the element will follow or respect the rounded outline created by the corner radius (see box-shadow). Because the corner changes the geometry of the element’s outer shape, it can also affect overflow clipping and how child content is masked at the corner, so designers often consider the radius together with layout, background, and decoration properties to achieve the intended visual result.

Definition

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="container">
<div class="card">
<div class="corner-label">Rounded top-right</div>
<p>border-top-right-radius: 40px;</p>
</div>
</div>
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #f0f4f8;
  font-family: Arial, sans-serif;
}

.card {
  width: 320px;
  padding: 24px;
  background: #fff;
  border: 2px solid #2b7cff;
  border-top-right-radius: 40px;
  box-shadow: 0 6px 18px rgba(43, 124, 255, 0.12);
}

.corner-label {
  display: inline-block;
  background: #2b7cff;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 12px;
}

p {
  margin: 0;
  color: #333;
  line-height: 1.4;
}

Browser Support

The following information will show you the current browser support for the CSS border-top-right-radius property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!