CSS outline-color property
Set the color of a dashed outline:
{
outline-style:dotted;
outline-color:#00ff00;
}
Try it out . . .
Description of property definition and use
Outline is a line drawn around an element on the periphery of the edge of the border.
The outline-color property specifies the outline color.
Note: Always declare the outline-style property before the outline-color property. An element can only change the color of its outline after it has been obtained.
Default: | invert |
---|---|
Inherited: | no |
Version: | CSS2 |
JavaScript syntax: | object .style.outlineColor="#00FF00" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
outline-color | 1.0 | 8.0 | 1.5 | 1.2 | 7.0 |
Tips and comments
Outline is around the element. I t is the margin around the element. However, it is from different border properties.
Outline is not part of the element size, so the width and height properties of the element do not contain the width of the outline.
The property value
value | describe | |
---|---|---|
color | Specify the contour color.exist CSS color value Look for a complete list of color values. | |
invert | default.Perform color reversal (reverse color).It can make the contour in different background colors. | |
inherit | It is specified that the contour color should be inherited from the parent elements. |
Related articles
CSS tutorial: CSS Outline
CSS Reference Manual: Outline Properties