border-inline-color
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.
Die border-inline-color
CSS Eigenschaft definiert die Farbe der logischen Inline-Ränder eines Elements, die je nach Schreibmodus, Richtung und Textorientierung des Elements auf eine physische Randfarbe abgebildet wird. Sie entspricht der border-top-color
und border-bottom-color
, oder der border-right-color
und border-left-color
Eigenschaft, abhängig von den Werten, die für writing-mode
, direction
und text-orientation
definiert sind.
Probieren Sie es aus
border-inline-color: red;
writing-mode: horizontal-tb;
border-inline-color: #32a1ce;
writing-mode: vertical-rl;
border-inline-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;
}
Die Randfarbe in der anderen Dimension kann mit border-block-color
gesetzt werden, das border-block-start-color
und border-block-end-color
definiert.
Syntax
border-inline-color: yellow;
border-inline-color: #f5f6f7;
/* Global values */
border-inline-color: inherit;
border-inline-color: initial;
border-inline-color: revert;
border-inline-color: revert-layer;
border-inline-color: unset;
Werte
<color>
-
Die Farbe des Randes.
Formale Definition
Anfangswert | currentcolor |
---|---|
Anwendbar auf | alle Elemente |
Vererbt | Nein |
Berechneter Wert | berechnete Farbe |
Animationstyp | by computed value type |
Formale Syntax
Beispiele
Randfarbe mit vertikalem Text
HTML
<div>
<p class="exampleText">Example text</p>
</div>
CSS
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 10px solid blue;
border-inline-color: red;
}
Ergebnisse
Spezifikationen
Specification |
---|
CSS Logical Properties and Values Level 1 # propdef-border-inline-color |
Browser-Kompatibilität
BCD tables only load in the browser
Siehe auch
- CSS Logical Properties and Values
- Diese Eigenschaft wird auf die physischen Rand-Eigenschaften abgebildet:
border-top-color
,border-right-color
,border-bottom-color
, oderborder-left-color
. writing-mode
,direction
,text-orientation