aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/border-bottom-left-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-left-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-left-radius')
-rw-r--r--files/zh-cn/web/css/border-bottom-left-radius/index.html270
1 files changed, 270 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/border-bottom-left-radius/index.html b/files/zh-cn/web/css/border-bottom-left-radius/index.html
new file mode 100644
index 0000000000..4f33b40f4c
--- /dev/null
+++ b/files/zh-cn/web/css/border-bottom-left-radius/index.html
@@ -0,0 +1,270 @@
+---
+title: 左下边框圆角
+slug: Web/CSS/border-bottom-left-radius
+translation_of: Web/CSS/border-bottom-left-radius
+---
+<div>{{CSSRef}}</div>
+
+<h2 id="Summary">Summary</h2>
+
+<p>总览</p>
+
+<p><strong><code>border-bottom-left-radius</code></strong> 这个css属性设置元素左下角的圆角。圆角可以是圆或椭圆(注:应为圆或椭圆的一部分),或者当其中一个值为0时,圆角将不被设置,这时这个角将展示为直角。</p>
+
+<div style="text-align: center;"><img alt="border-bottom-left-radius.png" class="default internal" src="/@api/deki/files/6136/=border-bottom-left-radius.png"></div>
+
+<p>一个无论是图像或颜色的背景,都会在边框上被裁剪,即使背景是圆角的; 裁剪的确切位置由 {{cssxref("background-clip")}} 属性定义.</p>
+
+<div class="note">如果该属性的值没有被一个在<strong><code>border-bottom-left-radius</code></strong> 属性后,作用于当前元素上的{{cssxref("border-radius")}}简写属性设置,那么该属性值将会被<a href="https://wiki.developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties">shorthand property</a>重置为初始值。</div>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="brush:css notranslate">/* 圆形 */
+/* border-bottom-left-radius: <em>radius</em> */
+border-bottom-left-radius: 3px;
+
+/* 椭圆形 */
+/* border-bottom-left-radius: <em>水平</em>方向 <em>垂直方向</em> */
+border-bottom-left-radius: 0.5em 1em;
+
+border-bottom-left-radius: inherit;
+</pre>
+
+<div style="font-size: 0.9em;">
+<p>where:</p>
+
+<dl style="padding-left: 6em;">
+ <dt style="float: left; width: 7.5em;"><em>radius</em></dt>
+ <dd style="padding-left: 7.5em;">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.</dd>
+ <dt style="float: left; width: 7.5em;"><em>horizontal</em></dt>
+ <dd style="padding-left: 7.5em;">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.</dd>
+ <dt style="float: left; width: 7.5em;"><em>vertical</em></dt>
+ <dd style="padding-left: 7.5em;">Is a {{cssxref("&lt;length&gt;")}} or a {{cssxref("&lt;percentage&gt;")}} denoting the vertical semi-major axis of the ellipsis to use for the border in that corner.</dd>
+</dl>
+</div>
+
+<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 notranslate">{{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-left-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 notranslate">
+div {
+ border-bottom-left-radius: 40px 40px;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-left-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 notranslate">
+div {
+ border-bottom-left-radius: 40px 20px;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-left-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 notranslate">
+div {
+ border-bottom-left-radius: 40%;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="background-color: lightgreen; border: solid 1px black; border-bottom-left-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 notranslate">
+div {
+ border-bottom-left-radius: 40%;
+}
+</pre>
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: 1.5em;">
+ <div style="border: black 3px double; border-bottom-left-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 notranslate">
+div {
+ border-bottom-left-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-left-radius', 'border-bottom-left-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>{{CompatUnknown}}</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>{{CompatUnknown}}</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>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td>Elliptical corners</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</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-bottomleft</code>, than the final property as Mozilla implemented it before the final name was coined.</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-bottomleft</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-bottom-right-radius")}}, and {{cssxref("border-top-left-radius")}}.</p>