border-inline-end-width
border-inline-end-width CSS 屬性定義了一個元素的邏輯行內尾部邊框的寬度,它根據元素的書寫模式、方向性和文字方向對映到物理邊框寬度。它對應於 border-top-width、border-right-width、border-bottom-width 或 border-left-width 屬性,具體取決於為 writing-mode、direction 和 text-orientation 定義的值。
試一試
border-inline-end-width: thick;
writing-mode: horizontal-tb;
border-inline-end-width: thick;
writing-mode: vertical-rl;
border-inline-end-width: 4px;
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: palegreen;
color: black;
border: 0 solid crimson;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}
語法
css
/* <'border-width'> values */
border-inline-end-width: 2px;
border-inline-end-width: thick;
/* Global values */
border-inline-end-width: inherit;
border-inline-end-width: initial;
border-inline-end-width: revert;
border-inline-end-width: revert-layer;
border-inline-end-width: unset;
相關屬性是 border-block-start-width、border-block-end-width 和 border-inline-start-width,它們定義了元素的其他邊框寬度。
值
<'border-width'>-
邊框的寬度。請參閱
border-width。
正式定義
正式語法
border-inline-end-width =
<line-width>
<line-width> =
<length [0,∞]> |
thin |
medium |
thick
示例
在垂直文字中應用邊框
HTML
html
<div>
<p class="exampleText">Example text</p>
</div>
CSS
css
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 1px solid blue;
border-inline-end-width: 5px;
}
結果
規範
| 規範 |
|---|
| CSS 邏輯屬性和值第 1 級 # border-width |
瀏覽器相容性
載入中…