This property sets the color for the visible portions of the overall outline of an element.
Item | Value |
---|---|
Initial value | invert |
Inherited | No. |
Version | CSS2 |
JavaScript syntax | object.style.outlineColor="#00FF00" |
Applies to | All elements. |
outline-color: color | invert | inherit
The property values are listed in the following table.
Value | Description |
---|---|
color | Set the color. |
invert | Default value. Set color inversion to make the outline visible. |
inherit | Specifies that the outline color should be inherited from the parent element |
outline-color |
Yes | 8.0 | Yes | Yes | Yes |
An example showing how to use outline-color CSS property.
<!DOCTYPE html>
<html>
<head>
<style>
p {<!-- w w w. j a va 2 s .com-->
border:1px solid red;
outline-style:dotted;
outline-color:#00ff00;
}
</style>
</head>
<body>
<p>paragraph.</p>
</body>
</html>