corner-right-shape

可用性有限

此特性不是基线特性,因为它在一些最广泛使用的浏览器中不起作用。

实验性: 这是一项实验性技术
在生产中使用此技术之前,请仔细检查浏览器兼容性表格

corner-right-shape CSS 属性指定了盒子右侧边缘的两个角的形状,在它们的 border-radius 区域内。

有关角形状行为的完整描述和多个示例,请参见 corner-shape 简写属性页面。

构成属性

corner-right-shape 属性是以下物理属性的简写:

语法

css
/* Single keyword value set for both corners */
corner-right-shape: bevel;
corner-right-shape: notch;

/* Single superellipse() value set for both corners */
corner-right-shape: superellipse(4);
corner-right-shape: superellipse(-0.9);

/* Top corner, bottom corner */
corner-right-shape: bevel notch;
corner-right-shape: notch superellipse(-0.9);

/* Global values */
corner-right-shape: inherit;
corner-right-shape: initial;
corner-right-shape: revert;
corner-right-shape: revert-layer;
corner-right-shape: unset;

corner-right-shape 属性使用一个或两个 <corner-shape-value> 值指定。

  • 如果使用一个值,它指定两个右角的形状。
  • 如果使用两个值,第一个值指定右上角的形状,第二个值指定右下角的形状。

正式定义

在数据库中未找到值!

正式语法

corner-right-shape = 
<'corner-top-left-shape'>{1,2}

<corner-top-left-shape> =
<corner-shape-value>

<corner-shape-value> =
round |
scoop |
bevel |
notch |
square |
squircle |
<superellipse()>

<superellipse()> =
superellipse( <number [-∞,∞]> |
infinity |
-infinity )

示例

你可以在 corner-shape 参考页面上找到其他相关示例。

corner-right-shape 的基本用法

HTML

此示例的标记包含一个单独的 <div> 元素。

html
<div></div>

CSS

我们给盒子设置了一些基本样式,为了简洁起见我们隐藏了它们。我们还应用了一个 box-shadow,一个 border-radius20% 30% / 50% 40%,以及一个 corner-right-shapesquare scoop

css
div {
  box-shadow: 1px 1px 3px gray;
  border-radius: 20% 30% / 50% 40%;
  corner-right-shape: square scoop;
}

结果

渲染结果如下所示:

规范

规范
CSS Borders and Box Decorations Module Level 4
# propdef-corner-right-shape

浏览器兼容性

另见