border-bottom-left-radius - CSS: Cascading Style Sheets 编辑

The border-bottom-left-radius CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner.

The rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.

border-bottom-left-radius.png

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 background-clip property.

Note: If the value of this property is not set in a border-radius shorthand property that is applied to the element after the border-bottom-left-radius CSS property, the value of this property is then reset to its initial value by the shorthand property.

Syntax

/* the corner is a circle */
/* border-bottom-left-radius: radius */
border-bottom-left-radius: 3px;

/* Percentage values */

/* circle if box is a square or ellipse if box is a rectangle */
border-bottom-left-radius: 20%;

/* same as above: 20% of horizontal(width) and vertical(height) */
border-bottom-left-radius: 20% 20%;

/* 20% of horizontal(width) and 10% of vertical(height) */
border-bottom-left-radius: 20% 10%;

/* the corner is an ellipse */
/* border-bottom-left-radius: horizontal vertical */
border-bottom-left-radius: 0.5em 1em;

border-bottom-left-radius: inherit;

With one value:

  • the value is a <length> or a <percentage> denoting the radius of the circle to use for the border in that corner.

With two values:

  • the first value is a <length> or a <percentage> denoting the horizontal semi-major axis of the ellipse to use for the border in that corner.
  • the second value is a <length> or a <percentage> denoting the vertical semi-major axis of the ellipse to use for the border in that corner.

Values

<length-percentage>
Denotes the size of the circle radius or the semi-major and semi-minor axes of the ellipse. As absolute length it can be expressed in any unit allowed by the CSS <length> 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.

Formal definition

Initial value0
Applies toall elements; but User Agents are not required to apply to table and inline-table elements when border-collapse is collapse. The behavior on internal table elements is undefined for the moment.. It also applies to ::first-letter.
Inheritedno
Percentagesrefer to the corresponding dimension of the border box
Computed valuetwo absolute <length>s or <percentage>s
Animation typea length, percentage or calc();

Formal syntax

<length-percentage>{1,2}

where
<length-percentage> = <length> | <percentage>

Examples

Examples of different border-bottom-left-radius values

Live exampleCode
.An arc of circle is used as the border
div {
  border-bottom-left-radius: 40px 40px;
}
.An arc of ellipse is used as the border
div {
  border-bottom-left-radius: 40px 20px;
}
.The box is a square: an arc of circle is used as the border
div {
  border-bottom-left-radius: 40%;
}
.The box is not a square: an arc of ellipse is used as the border
div {
  border-bottom-left-radius: 40%;
}
.The background color is clipped at the border
div {
  border-bottom-left-radius:40%;
  border-style: black 3px double;
  background-color: rgb(250,20,70);
  background-clip: content-box;
}

Specifications

SpecificationStatusComment
CSS Backgrounds and Borders Module Level 3
The definition of 'border-bottom-left-radius' in that specification.
Candidate RecommendationInitial definition

Browser compatibility

BCD tables only load in the browser

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:111 次

字数:10108

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文