Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. border-radius

border-radius

Sets the corner radius for all corners at once. The properties it can set together are『border-top-left-radius』,『border-top-right-radius』,『border-bottom-left-radius』, and『border-bottom-right-radius』.

You can specify different values for each corner by providing multiple values separated by spaces.

  • 1 value: applied to all four corners (top-left, top-right, bottom-right, bottom-left).
  • 2 values: first applies to top-left and bottom-right, second to top-right and bottom-left.
  • 3 values: first applies to top-left, second to top-right and bottom-left, third to bottom-right.
  • 4 values: applied to top-left, top-right, bottom-right, and bottom-left (clockwise from top-left).

Use『/』to specify separate horizontal and vertical radii for the corners. If『/』is omitted, a uniform radius (perfect circle) is used.

Sample Code

div.test { border-radius: 50%;}
div.test1 { border-radius: 25px;}
div.test2 { border-radius: 50% 25% 15%;}
div.test3 { border-radius: 25px 20px 15px 10px;}
div.test4 { border-radius: 50% / 25%;}

Available Values

ValueDescription
NumberSpecifies a numeric value. Common units are『px』and『%』. When using『%』, the reference is the element's size (border box). The default value is『0』.

Browser Preview

The background color of the samples below is『#00f』.

<div style="border-radius: 50%; background-color: #00f; margin: 0 auto; width: 100px; height: 100px;"></div>

<div style="border-radius: 25px; background-color: #00f; margin: 0 auto; width: 100px; height: 100px;"></div>

<div style="border-radius: 50% 25% 15%; background-color: #00f; margin: 0 auto; width: 100px; height: 100px;"></div>

<div style="border-radius: 25px 20px 15px 10px; background-color: #00f; margin: 0 auto; width: 100px; height: 100px;"></div>

<div style="border-radius: 50% / 25%; background-color: #00f; margin: 0 auto; width: 100px; height: 100px;"></div>

Browser Compatibility

Chrome Chrome
4+
3
2
1
↑ Requires prefix『-webkit-』
Firefox Firefox
4+
3
2
1
↑ Requires prefix『-moz-』
Safari Safari
5+
4
3
↑ Requires prefix『-webkit-』
2 and below ×
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8 ×
7 ×
6 ×
Opera Opera
10.5+
9 and below ×
iOS Safari iOS Safari
4.2+
3
2
1
↑ Requires prefix『-webkit-』
Android Android Browser
≤4.4+
Chrome Android Chrome Android
Latest
Same support as desktop version
Firefox Android Firefox Android
Latest
Same support as desktop version

※ Version information is based on MDN / Can I Use.

Notes

Sets the corner radius for all corners at once.

When using『%』, the reference value is the element's size (border box). To make an element circular, set『border-radius』to『50%』.

<div style="border-radius: 50%; background-color: #00f; margin: 0 auto; width: 100px; height: 100px;"></div>

Use『/』to set horizontal and vertical radii individually. The value before『/』is the horizontal radius, and the value after is the vertical radius. This allows corners to be rounded as an ellipse rather than a perfect circle. If『/』is omitted, a uniform radius (perfect circle) is used.

/* div { border-radius: horizontal / vertical;} */
div.test { border-radius: 50px 45px 40px 35px / 25px 20px 15px 10px;}

Note that some older Android stock browsers have a bug where specifying a『%』value for『border-radius』may not render correctly.

If you find any errors or copyright issues, please .