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

瀏覽器相容性

另見