border-inline-start-style
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 CSS border-inline-start-style xác định kiểu của đường viền logic phía đầu theo chiều ngang nội tuyến của một phần tử, ánh xạ tới kiểu đường viền vật lý tương ứng tùy thuộc vào chế độ viết, chiều 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-style, border-right-style, border-bottom-style, hoặc border-left-style tùy theo các giá trị được xác định cho writing-mode, direction, và text-orientation.
Try it
border-inline-start-style: dotted;
writing-mode: horizontal-tb;
border-inline-start-style: dotted;
writing-mode: vertical-rl;
border-inline-start-style: groove;
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: black;
border: 0.75em solid;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}
Cú pháp
/* Giá trị <'border-style'> */
border-inline-start-style: dashed;
border-inline-start-style: dotted;
border-inline-start-style: groove;
/* Giá trị toàn cục */
border-inline-start-style: inherit;
border-inline-start-style: initial;
border-inline-start-style: revert;
border-inline-start-style: revert-layer;
border-inline-start-style: unset;
Các thuộc tính liên quan là border-block-start-style, border-block-end-style, và border-inline-end-style, xác định kiểu đường viền còn lại của phần tử.
Giá trị
<'border-style'>-
Kiểu đường của đường viền. Xem
border-style.
Định nghĩa hình thức
| Initial value | none |
|---|---|
| Applies to | all elements |
| Inherited | no |
| Computed value | as specified |
| Animation type | discrete |
Cú pháp hình thức
border-inline-start-style =
<line-style>
<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-lr;
border: 5px solid blue;
border-inline-start-style: dashed;
}
Thông số kỹ thuật
| Specification |
|---|
| CSS Logical Properties and Values Module Level 1> # border-style> |
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-style,border-right-style,border-bottom-style, hoặcborder-left-style. writing-mode,direction,text-orientation