corner-start-end-shape

可用性有限

此特性不是基線特性,因為它在一些最廣泛使用的瀏覽器中不起作用。

實驗性: 這是一項實驗性技術
在生產中使用此技術之前,請仔細檢查瀏覽器相容性表格

corner-start-end-shape CSS 屬性用於指定盒子在其 border-radius 區域內,塊起始和行結束角的形狀。

有關角形狀行為的完整描述和多個示例,請參見 corner-shape 簡寫屬性頁面。

語法

css
/* Keyword values */
corner-start-end-shape: square;
corner-start-end-shape: bevel;

/* superellipse() function values */
corner-start-end-shape: superellipse(1.5);
corner-start-end-shape: superellipse(-2.2);

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

corner-start-end-shape 屬性使用 <corner-shape-value> 值指定。

正式定義

在資料庫中未找到值!

正式語法

corner-start-end-shape = 
<corner-shape-value>

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

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

示例

你可以在 corner-shape 參考頁面上找到其他相關示例。

corner-start-end-shape 的基本用法

HTML

此示例的標記包含一個單獨的 <div> 元素。

html
<div></div>

CSS

我們為盒子提供了一些基本樣式,為了簡潔起見,我們將其隱藏。我們還應用了 box-shadow,一個 border-radius20px 40px 60px 80px,以及一個 notchcorner-start-end-shape 值。

css
div {
  box-shadow: 1px 1px 3px gray;
  border-radius: 20px 40px 60px 80px;
  corner-start-end-shape: notch;
}

結果

渲染結果如下所示:

規範

規範
CSS Borders and Box Decorations Module Level 4
# propdef-corner-start-end-shape

瀏覽器相容性

另見