border-inline-end
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Thuộc tính border-inline-end CSS là thuộc tính viết tắt để đặt các giá trị thuộc tính đường viền cuối nội tuyến logic riêng lẻ ở một chỗ trong bảng kiểu.
Try it
border-inline-end: solid;
writing-mode: horizontal-tb;
border-inline-end: dashed red;
writing-mode: vertical-rl;
border-inline-end: 1rem solid;
writing-mode: horizontal-tb;
direction: rtl;
<section class="default-example" id="default-example">
<div class="transition-all" id="example-element">
This is a box with a border around it.
</div>
</section>
#example-element {
background-color: #eeeeee;
color: darkmagenta;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}
Các thuộc tính thành phần
Thuộc tính này là viết tắt cho các thuộc tính CSS sau:
Cú pháp
border-inline-end: 1px;
border-inline-end: 2px dashed;
border-inline-end: medium dashed blue;
/* Giá trị toàn cục */
border-inline-end: inherit;
border-inline-end: initial;
border-inline-end: revert;
border-inline-end: revert-layer;
border-inline-end: unset;
Đường viền vật lý mà border-inline-end ánh xạ tới phụ thuộc vào chế độ viết, hướng và hướng văn bản của phần tử. Nó tương ứng với thuộc tính border-top, border-right, border-bottom, hoặc border-left tùy thuộc vào các giá trị được xác định cho writing-mode, direction và text-orientation.
Các thuộc tính liên quan là border-block-start, border-block-end và border-inline-start, xác định các đường viền khác của phần tử.
Giá trị
border-inline-end được chỉ định với một hoặc nhiều giá trị sau, theo bất kỳ thứ tự nào:
<'border-width'>-
Chiều rộng của đường viền. Xem
border-width. <'border-style'>-
Kiểu đường của đường viền. Xem
border-style. <color>-
Màu sắc của đường viền.
Định nghĩa hình thức
| Initial value | as each of the properties of the shorthand:
|
|---|---|
| Applies to | all elements |
| Inherited | no |
| Computed value | as each of the properties of the shorthand:
|
| Animation type | as each of the properties of the shorthand:
|
Cú pháp hình thức
border-inline-end =
<line-width> ||
<line-style> ||
<color>
<line-width> =
<length [0,∞]> |
hairline |
thin |
medium |
thick
<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset
Ví dụ
>HTML
<div>
<p class="exampleText">Example text</p>
</div>
CSS
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-rl;
border-inline-end: 5px dashed blue;
}
Thông số kỹ thuật
| Specification |
|---|
| CSS Logical Properties and Values Module Level 1> # border-shorthands> |
Tương thích trình duyệt
Xem thêm
- Thuộc tính và giá trị logic CSS
- Thuộc tính này ánh xạ tới một trong các thuộc tính đường viền vật lý:
border-top,border-right,border-bottom, hoặcborder-left. writing-mode,direction,text-orientation