corner-left-shape
corner-left-shape CSS 屬性用於指定一個盒子左側邊緣兩個角的形狀,在其 border-radius 區域內。
有關角形狀行為的完整描述和多個示例,請參見 corner-shape 簡寫屬性頁面。
構成屬性
corner-left-shape 屬性是以下物理屬性的簡寫:
語法
css
/* Single keyword value set for both corners */
corner-left-shape: round;
corner-left-shape: bevel;
/* Single superellipse() value set for both corners */
corner-left-shape: superellipse(1.2);
corner-left-shape: superellipse(-2.5);
/* Top corner, bottom corner */
corner-left-shape: round bevel;
corner-left-shape: bevel superellipse(1.2);
/* Global values */
corner-left-shape: inherit;
corner-left-shape: initial;
corner-left-shape: revert;
corner-left-shape: revert-layer;
corner-left-shape: unset;
值
corner-left-shape 屬性使用一個或兩個 <corner-shape-value> 值指定。
- 如果使用一個值,它指定兩個左角的形狀。
- 如果使用兩個值,第一個值指定左上角的形狀,第二個值指定左下角的形狀。
正式定義
在資料庫中未找到值!正式語法
corner-left-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-left-shape 的基本用法
HTML
此示例的標記包含一個單獨的 <div> 元素。
html
<div></div>
CSS
我們給盒子設定了一些基本樣式,為了簡潔起見我們隱藏了這些樣式。我們還應用了一個 box-shadow,一個 border-radius 為 20px 40px / 60px 80px,以及一個 corner-left-shape 為 notch bevel。
css
div {
box-shadow: 1px 1px 3px gray;
border-radius: 20px 40px / 60px 80px;
corner-left-shape: notch bevel;
}
結果
渲染結果如下所示:
規範
| 規範 |
|---|
| CSS Borders and Box Decorations Module Level 4 # propdef-corner-left-shape |
瀏覽器相容性
載入中…