aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/border-bottom-right-radius
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/border-bottom-right-radius
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/border-bottom-right-radius')
-rw-r--r--files/zh-cn/web/css/border-bottom-right-radius/index.html272
1 files changed, 272 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/border-bottom-right-radius/index.html b/files/zh-cn/web/css/border-bottom-right-radius/index.html
new file mode 100644
index 0000000000..d63776da87
--- /dev/null
+++ b/files/zh-cn/web/css/border-bottom-right-radius/index.html
@@ -0,0 +1,272 @@
+---
+title: border-bottom-right-radius
+slug: Web/CSS/border-bottom-right-radius
+translation_of: Web/CSS/border-bottom-right-radius
+---
+<div>{{CSSRef}}</div>
+
+<p>The <strong><code>border-bottom-right-radius</code></strong> CSS property sets the rounding of the bottom-right corner of the element.</p>
+
+<pre class="brush:css no-line-numbers">/* The corner is a circle */
+/* border-bottom-right-radius: <em>radius</em> */
+border-bottom-right-radius: 3px;
+
+/* Percentage values */
+border-bottom-right-radius: 20%; /* corner of a circle if box is a square or else corner of a rectangle */
+border-bottom-right-radius: 20% 20%; /* same as above */ /* 20% of horizontal(width) and vertical(height) */
+border-bottom-right-radius: 20% 10%; /* 20% of horizontal(width) and 10% of vertical(height) */
+
+/*The corner is an ellipsis */
+/* border-bottom-right-radius: horizontal vertical */
+border-bottom-right-radius: 0.5em 1em;
+
+border-bottom-right-radius: inherit;</pre>
+
+<p>The rounding can be a circle or an ellipse, or if one of the value is <code>0</code> no rounding is done and the corner is square.</p>
+
+<div style="text-align: center;"><img alt="border-bottom-right-radius.png" class="default internal" src="/@api/deki/files/6134/=border-bottom-right-radius.png"></div>
+
+<p>A background, being an image or a color, is clipped at the border, even a rounded one; the exact location of the clipping is defined by the value of the {{cssxref("background-clip")}} property.</p>
+
+<div class="note">If the value of this property is not set in a {{cssxref("border-radius")}} shorthand property that is applied to the element after the <code>border-bottom-right-radius</code> CSS property, the value of this property is then reset to its initial value by the <a href="/en-US/docs/Web/CSS/Shorthand_properties">shorthand property</a>.</div>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<p>With one value:</p>
+
+<ul>
+ <li>the value is a {{cssxref("&lt;length&gt;")}} or a {{cssxref("&lt;percentage&gt;")}} denoting the radius of the circle to use for the border in that corner.</li>
+</ul>
+
+<p>With two values:</p>
+
+<ul>
+ <li>the first value is a {{cssxref("&lt;length&gt;")}} or a {{cssxref("&lt;percentage&gt;")}} denoting the horizontal semi-major axis of the ellipsis to use for the border in that corner.</li>
+ <li>the second value is a {{cssxref("&lt;percentage&gt;")}} denoting the vertical semi-major axis of the ellipsis to use for the border in that corner.</li>
+</ul>
+
+<h3 id="Values">Values</h3>
+
+<dl>
+ <dt><code>&lt;length-percentage&gt;</code></dt>
+ <dd>Denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipsis. As absolute length it can be expressed in any unit allowed by the CSS {{cssxref("&lt;length&gt;")}} data type. Percentages for the horizontal axis refer to the width of the box, percentages for the vertical axis refer to the height of the box. Negative values are invalid.</dd>
+</dl>
+
+<h3 id="Formal_syntax">Formal syntax</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Examples">Examples</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th>Live example</th>
+ <th>Code</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-right-radius: 40px 40px; width: 100px; height: 100px;">
+ <div style="display: none;">.</div>
+ </div>
+ </td>
+ <td>An arc of circle is used as the border
+ <pre class="brush: css">
+div {
+ border-bottom-right-radius: 40px 40px;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-right-radius: 40px 20px; width: 100px; height: 100px;">
+ <div style="display: none;">.</div>
+ </div>
+ </td>
+ <td>An arc of ellipse is used as the border
+ <pre class="brush: css">
+div {
+ border-bottom-right-radius: 40px 20px;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-right-radius: 40%; width: 100px; height: 100px;">
+ <div style="display: none;">.</div>
+ </div>
+ </td>
+ <td>The box is a square: an arc of circle is used as the border
+ <pre class="brush: css">
+div {
+ border-bottom-right-radius: 40%;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-right-radius: 40%; width: 100px; height: 200px;">
+ <div style="display: none;">.</div>
+ </div>
+ </td>
+ <td>The box is not a square: an arc of ellipse is used as the border
+ <pre class="brush: css">
+div {
+ border-bottom-right-radius: 40%;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="border: black 3px double; border-bottom-right-radius: 40%; height: 100px; width: 100px; background-color: rgb(250,20,70); background-clip: content-box;">
+ <div style="display: none;">.</div>
+ </div>
+ </td>
+ <td>The background color is clipped at the border
+ <pre class="brush: css">
+div {
+ border-bottom-right-radius:40%;
+ border-style: black 3px double;
+ background-color: rgb(250,20,70);
+ background-clip: content-box;
+}
+</pre>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS3 Backgrounds', '#border-bottom-right-radius', 'border-bottom-right-radius')}}</td>
+ <td>{{Spec2('CSS3 Backgrounds')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>1.0 {{property_prefix("-webkit")}}<br>
+ 4.0</td>
+ <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}<br>
+ {{CompatVersionUnknown}}</td>
+ <td>1.0 (1.0){{property_prefix("-moz")}}<sup>[1]</sup><br>
+ 4.0 (2.0)<sup>[3]</sup></td>
+ <td>9.0</td>
+ <td>10.5</td>
+ <td>3.0 (522){{property_prefix("-webkit")}}<br>
+ 5.0 (532.5)</td>
+ </tr>
+ <tr>
+ <td>Percentages</td>
+ <td>4.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>1.0 (1.0)<sup>[2]</sup><br>
+ 4.0 (2.0)</td>
+ <td>9.0</td>
+ <td>10.5</td>
+ <td>5.0 (532.5)</td>
+ </tr>
+ <tr>
+ <td>Elliptical corners</td>
+ <td>1.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>3.5 (1.9.1)</td>
+ <td>9.0</td>
+ <td>10.5</td>
+ <td>3.0 (522)</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}<br>
+ {{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}<sup>[3]</sup></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td>Percentages</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td>Elliptical corners</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] The prefixed version (allowed from Firefox 1 to Firefox 12) of this property uses a different name, <code>-moz-border-radius-bottomright</code>.</p>
+
+<p>[2] Before Firefox 4, the {{cssxref("&lt;percentage&gt;")}} was relative to the width of the box even when specifying the radius for a height). This implied that <code>-moz-border-radius-bottomright</code> was always drawing an arc of circle, and never an ellipse, when followed by a single value.</p>
+
+<p>[3] Prior to Gecko 50.0 {{geckoRelease("50.0")}}, border styles of rounded corners were always rendered as if <code>border-style</code> was <code>solid</code>. This has been fixed in Gecko 50.0.</p>
+
+<p>In addition to the unprefixed support, Gecko 44.0 {{geckoRelease("44.0")}} added support for a <code>-webkit</code> prefixed version of the property for web compatibility reasons behind the preference <code>layout.css.prefixes.webkit</code>, defaulting to <code>false</code>. Since Gecko 49.0 {{geckoRelease("49.0")}} the preference defaults to <code>true</code>.</p>
+
+<h2 id="See_also">See also</h2>
+
+<p>The border-radius-related CSS properties: the CSS shorthand {{cssxref("border-radius")}}, the properties for the other corners: {{cssxref("border-top-right-radius")}}, {{cssxref("border-top-left-radius")}}, and {{cssxref("border-bottom-left-radius")}}.</p>