border-inline-start-color
border-inline-start-color CSS 屬性定義了一個元素的邏輯行首邊框的顏色,它根據元素的書寫模式、方向性和文字方向對映到物理邊框顏色。它對應於 border-top-color、border-right-color、border-bottom-color 或 border-left-color 屬性,具體取決於為 writing-mode、direction 和 text-orientation 定義的值。
試一試
border-inline-start-color: red;
writing-mode: horizontal-tb;
border-inline-start-color: #32a1ce;
writing-mode: vertical-rl;
border-inline-start-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: #eeeeee;
color: black;
border: 0.75em solid;
padding: 0.75em;
width: 80%;
height: 100px;
unicode-bidi: bidi-override;
}
語法
css
border-inline-start-color: red;
border-inline-start-color: #ee4141;
/* Global values */
border-inline-start-color: inherit;
border-inline-start-color: initial;
border-inline-start-color: revert;
border-inline-start-color: revert-layer;
border-inline-start-color: unset;
相關屬性包括 border-block-start-color、border-block-end-color 和 border-inline-end-color,它們定義了元素的其他邊框顏色。
值
<color>-
邊框的顏色。
正式定義
正式語法
border-inline-start-color =
<color> |
<image-1D>
<image-1D> =
<stripes()>
<stripes()> =
stripes( <color-stripe># )
<color-stripe> =
<color> &&
[ <length-percentage> | <flex> ]?
<length-percentage> =
<length> |
<percentage>
示例
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: 10px solid blue;
border-inline-start-color: red;
}
規範
| 規範 |
|---|
| CSS 邏輯屬性和值第 1 級 # border-color |
瀏覽器相容性
載入中…