CSS border-start-start-radius attribute

Definition and usage

border-start-start-radius The attribute is used to define the corner radius between the starting point of the element block direction (block-start) and the starting point of the inline direction (inline-start).

Note:related CSS attributes writing-modetext-orientationdirection Defines the block direction and inline direction. This is why these attributes also affect border-start-start-radius The result of the attribute. For English pages, the inline direction is from left to right, and the block direction is downward.

If border-start-start-radius If an attribute has two values, the corner will be elliptical:

border-start-start-radius: 50px 100px;

If border-start-start-radius If an attribute has a value, the corner will be circular:

border-start-start-radius: 50px;

CSS border-start-start-radius attributes and border-bottom-left-radiusborder-bottom-right-radiusborder-top-left-radiusborder-top-right-radius 属性非常相似,但 border-start-start-radius 属性依赖于块方向和行内方向。

实例

例子 1

为某些元素的块方向起始处和行内方向起始处添加圆角:

#example1 {
  background-color: lightblue;
  border-start-start-radius: 50px;
}
#example2 {
  background-color: lightblue;
  border-start-start-radius: 50px 20px;
}
#example3 {
  background-color: lightblue;
  border-start-start-radius: 50%;
  direction: rtl;
}
#example4 {
  background-color: lightblue;
  border-start-start-radius: 50%;
  writing-mode: vertical-rl;
}

亲自试一试

例子 2:结合 direction 属性

块方向和行内方向起始处的圆角位置受 direction 属性的影响:

#example1 {
  border: 2px solid red;
  direction: rtl;
  border-start-start-radius: 25px;
}

亲自试一试

例子 3:结合 writing-mode 属性

块方向和行内方向起始处的圆角位置受 writing-mode 属性的影响:

#example2 {
  border: 2px solid red;
  writing-mode: vertical-rl;
  border-start-start-radius: 25px;
}

亲自试一试

CSS 语法

border-start-start-radius: 0|length|initial|inherit;

属性值

描述
0 默认值。
length 定义块方向起始处和行内方向起始处的圆角形状。请参阅:Μονάδες CSS
% 以元素在对应轴上的长度的百分比定义此圆角形状。
initial 将此属性设置为其默认值。参阅 initial
inherit 从其父元素继承此属性。参阅 inherit

技术细节

默认值: 0
继承性:
动画制作: 支持。请参阅:动画相关属性
版本: CSS3
JavaScript 语法: object.style.borderStartStartRadius="50px"

浏览器支持

表格中的数字表示首个完全支持该属性的浏览器版本。

Chrome Edge Firefox Safari Opera
89.0 89.0 66.0 15.0 75.0

相关页面

Εκμάθηση:CSS Γωνίες

Αναφορά:CSS border-bottom-left-radius attribute

Αναφορά:CSS border-bottom-right-radius attribute

Αναφορά:CSS border-top-left-radius attribute

Αναφορά:CSS border-top-right-radius attribute

Αναφορά:CSS direction ιδιότητα

Αναφορά:Ενότητα CSS text-orientation

Αναφορά:Ενότητα CSS writing-mode