--- title: outline-color slug: Web/CSS/outline-color translation_of: Web/CSS/outline-color ---
Die outline-color CSS-Eigenschaft bestimmt die Farbe der Outline (den Umriss) eines Elements. Eine Outline ist eine Linie, die außerhalb des Rahmens (border) um Elemente gezeigt wird, damit das Element hervorsticht.
{{cssinfo}}
/* Keyword values */ outline-color: invert; outline-color: red; /* Global values */ outline-color: inherit; outline-color: initial; outline-color: unset;
<color>invert<p class="example">My outline is blue, da ba dee.</p>
.example {
/* first need to set "outline" */
outline: 2px solid;
/* make the outline blue */
outline-color: #0000FF;
}
{{ EmbedLiveSample('Example', '', '', '', 'Web/CSS/outline-color') }}
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('CSS3 Basic UI', '#outline-color', 'outline-color')}} | {{Spec2('CSS3 Basic UI')}} | No change |
| {{SpecName('CSS3 Transitions', '#animatable-css', 'outline-color')}} | {{Spec2('CSS3 Transitions')}} | Defines outline-color as animatable. |
| {{SpecName('CSS2.1', 'ui.html#propdef-outline-color', 'outline-color')}} | {{Spec2('CSS2.1')}} | Initial definition |
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|---|
| Basic support | 1.0 | {{CompatVersionUnknown}} | {{CompatGeckoDesktop("1.8")}} [1] | 8.0 | 7.0 | 1.2 (125) |
invert value |
{{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} [2] | 8.0 | {{CompatNo}} [3] | {{CompatNo}} |
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | {{CompatUnknown}} | {{CompatVersionUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
[1] In versions previous to Gecko 1.8: -moz-outline-color.
[2] Support had been dropped in version 3.0 (1.9).
[3] Supported in Opera 7 but support was dropped in Opera 15 with the adoption of Chromium/Blink engine.