corner-inline-end-shape

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Thuộc tính CSS corner-inline-end-shape chỉ định hình dạng của cả hai góc trên cạnh inline-end của một hộp, trong phạm vi vùng border-radius của chúng.

Để có mô tả đầy đủ về hành vi hình dạng góc và nhiều ví dụ, xem trang thuộc tính viết tắt corner-shape.

Các thuộc tính cấu thành

Thuộc tính corner-inline-end-shape là viết tắt của các thuộc tính logic sau:

Cú pháp

css
/* Single keyword value set for both corners */
corner-inline-end-shape: squircle;
corner-inline-end-shape: scoop;

/* Single superellipse() value set for both corners */
corner-inline-end-shape: superellipse(1.5);
corner-inline-end-shape: superellipse(-0.8);

/* Block-start/inline-end corner, block-end/inline-end corner */
corner-inline-end-shape: squircle scoop;
corner-inline-end-shape: squircle superellipse(-0.8);

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

Giá trị

Thuộc tính corner-inline-end-shape được chỉ định bằng một hoặc hai giá trị <corner-shape-value>:

  • Nếu dùng một giá trị, nó chỉ định hình dạng của cả hai góc inline-end.
  • Nếu dùng hai giá trị, giá trị đầu tiên chỉ định hình dạng của góc block-start/inline-end, và giá trị thứ hai chỉ định hình dạng của góc block-end/inline-end.

Định nghĩa hình thức

Initial valueas each of the properties of the shorthand:
Applies toall elements. It also applies to ::first-letter.
Inheritedno
Computed valueas each of the properties of the shorthand:
Animation typeas each of the properties of the shorthand:

Cú pháp hình thức

corner-inline-end-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 )

Ví dụ

Bạn có thể tìm các ví dụ liên quan khác trên trang tham chiếu corner-shape.

Cách dùng cơ bản của corner-inline-end-shape

HTML

Mã đánh dấu cho ví dụ này chứa một phần tử <div> duy nhất.

html
<div></div>

CSS

Chúng ta cho hộp một số kiểu dáng cơ bản, được ẩn để ngắn gọn. Chúng ta cũng áp dụng box-shadow, border-radius15% 30%, và corner-inline-end-shapebevel squircle.

css
div {
  box-shadow: 1px 1px 3px gray;
  border-radius: 15% 30%;
  corner-inline-end-shape: bevel squircle;
}

Kết quả

Kết quả hiển thị như sau:

Thông số kỹ thuật

Specification
CSS Borders and Box Decorations Module Level 4
# propdef-corner-inline-end-shape

Khả năng tương thích trình duyệt

Xem thêm