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 |
浏览器兼容性
加载中…