outline-color CSS property sets the color of the outline of an element. However, in many cases the shorthand property
outline is more convenient to use and preferable.
The following table summarizes the usages context and the version history of this property.
|Applies to:||All elements|
|Animatable:||Yes. See animatable properties.|
|Version:||CSS 2, 3|
The syntax of the property is given with:
The example below shows the
outline-color property in action.
ExampleTry this code »
Note:You must declare the
outline-style property before the
outline-color property. An element must have outlines before you can set the color of the outline, because the default value of
outline-style property is
The following table describes the values of this property.
|color||Specifies the color of the outline. Look at CSS Color Values for the list of possible color values.|
||Performs a color inversion on the pixels of the screen to ensures that the outline is visible, regardless of any background colors. This is default.|
||Sets this property to its default value.|
||If specified, the associated element takes the computed value of its parent element
outline-color property is supported in all major modern browsers.
Warning:Internet Explorer 7 and earlier versions don't support the
outline-color property. IE8 however supports this property, but requires a valid