border-inline-end-color
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.
Please take two minutes to fill out our short survey.
CSS 属性 border-inline-end-color
定义了元素的逻辑行末的边框颜色,并根据元素的书写模式、行内方向和文本朝向对应至实体边框颜色。根据 writing-mode
、direction
和 text-orientation
所定义的值,此属性对应于 border-top-color
、border-right-color
、border-bottom-color
或 border-left-color
属性。
尝试一下
border-inline-end-color: red;
writing-mode: horizontal-tb;
border-inline-end-color: #32a1ce;
writing-mode: vertical-rl;
border-inline-end-color: rgb(170, 50, 220, 0.6);
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: #eee;
color: #000;
border: 0.75em solid;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}
语法
css
border-inline-end-color: rebeccapurple;
border-inline-end-color: #663399;
/* 全局值 */
border-inline-end-color: inherit;
border-inline-end-color: initial;
border-inline-end-color: revert;
border-inline-end-color: revert-layer;
border-inline-end-color: unset;
与此相关的属性有 border-block-start-color
、border-block-end-color
和 border-inline-start-color
,这些属性定义了元素其他边框的颜色。
取值
形式定义
形式语法
示例
HTML
html
<div>
<p class="exampleText">示例文本</p>
</div>
CSS
css
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 10px solid blue;
border-inline-end-color: red;
}
规范
Specification |
---|
CSS Logical Properties and Values Level 1 # border-color |