CSS outline-color property
Examples
Setting a dotted outline color:
{
outline-style: dotted;
outline-color: # 00ff00;
}
try it"
Attribute definitions and instructions
outline (contour) is plotted on a line surrounding elements, located just outside the border edge.
outline-color attribute specifies the color of the outline.
Note: Always declare outline-style property before the outline-color property.Only after winning the contour element to change its color profile.
Defaults: | invert |
---|---|
inherit: | no |
version: | CSS2 |
JavaScript syntax: | object .style.outlineColor = "# 00FF00" |
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
outline-color | 1.0 | 8.0 | 1.5 | 1.2 | 7.0 |
Tips and Notes
outline around the element. It is padding around the elements. However, it is different from the border property.
Part of the outline is not an element size, and therefore the width and height attributes of the element does not include the width of the profile.
Property Value
值 | 描述 | |
---|---|---|
color | 指定轮廓颜色。在 CSS颜色值寻找颜色值的完整列表。 | |
invert | 默认。执行颜色反转(逆向的颜色)。可使轮廓在不同的背景颜色中都是可见。 | |
inherit | 规定应该从父元素继承轮廓颜色的设置。 |
related articles
CSS tutorial: CSS Outline
CSS Reference: Outline Properties