corner-top-right-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-top-right-shape chỉ định hình dạng của góc trên-phải của một hộp, trong phạm vi vùng border-radius của nó.

Để 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ú pháp

css
/* Keyword values */
corner-top-right-shape: scoop;
corner-top-right-shape: square;

/* superellipse() function values */
corner-top-right-shape: superellipse(2.2);
corner-top-right-shape: superellipse(-2.5);

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

Giá trị

Thuộc tính corner-top-right-shape được chỉ định bằng giá trị <corner-shape-value>.

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

Initial valueround
Applies toall elements. It also applies to ::first-letter.
Inheritedno
Computed valueThe corresponding superellipse() value.
Animation typeAnimates as per superellipse interpolation.

Cú pháp hình thức

corner-top-right-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-top-right-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-radius là 60 pixel, và corner-top-right-shapebevel.

css
div {
  box-shadow: 1px 1px 3px gray;
  border-radius: 60px;
  corner-top-right-shape: bevel;
}

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-top-right-shape

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

Xem thêm