outline-color
Description
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. |
Syntax and Property Values
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 |
Example
<!DOCTYPE html>
<html>
<head>
<style>
p {<!--from w w w.j ava 2s .c om-->
border:1px solid red;
outline-style:dotted;
outline-color:#00ff00;
}
</style>
</head>
<body>
<p>paragraph.</p>
</body>
</html>
The code above generates the following result.