aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/border-bottom-left-radius/index.html
blob: 9051dc630cef8d0ea387bd8e1560840300d9e3c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
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="/zh-CN/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>

{{csssyntax}}

<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 class="hidden">.</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 class="hidden">.</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 class="hidden">.</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 class="hidden">.</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 class="hidden">.</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>

{{Compat("css.properties.border-bottom-left-radius")}}

<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>