Übersicht
Der Wert initial repräsentiert einen vom Browser vorgegebenen Standardwert. Der Wert ist in jeder CSS Eigenschaft verfügbar, hat aber verschiedene Auswirkungen.
Siehe Standardwert.
Beispiel
/* give headers a green border */
h2 { border: medium solid green }
/* but make those in the sidebar use the value of the "color" property */
#sidebar h2 { border-color: initial; }
<p style="color:red">
this text is red
<em style="color:initial">
this text is in the initial color (e.g. black)
</em>
this is red again
</p>
Spezifikation
| Spezifikation | Status | Anmerkung |
|---|---|---|
| CSS Values and Units Level 3 | Anwärter Empfehlung | Wert hinzugefügt |
| CSS Cascade And Inheritance Level 3 | Anwärter Empfehlung | Definiert den Wert |
Browser Kompatibilität
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | 1.0 | Unknown (3.5)-moz[*] 19.0 (19.0) |
Nicht unterstützt | 15.0 | 1.2(125) |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | 1.0 | 3.0 (3.0)-moz[*] 169.0 (169.0) |
Nicht unterstützt | Nicht unterstützt | (Ja) |
[*] Seit Firefox 1.0 wurden die Werte für -moz-initial festgelegt, bis mit der Definition von quotes ab Firefox 3.5 (Gecko 1.9.1) der Wert implementiert werden konnte. Die Werte für -moz-border-*-colors wurden erst in in Firefox 3.6 (Gecko 1.9.2) hinzugefügt. Der Wert mit Präfix (-moz-initial) wurde in Firefox 19 durch initial erstetzt und wird seit Firefox 24 nichtmehr unterstützt.