CSS outline property
Description of property definition and use
Outline is a line drawn around an element that is located on the periphery of the edge of the border and serves as a prominent element.
Outline short-case properties set all contour properties in one declaration.
The properties that can be set are (in order): outline-color, outline-style, outline-width
If you don't set one of these values, there's no problem, such as outline:solid #ff0000; It is also allowed.
Default: | invert none medium |
---|---|
Inherited: | no |
Version: | CSS2 |
JavaScript syntax: | object .style.outline="#0000FF dotted thin" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
outline | 1.0 | 8.0 | 1.5 | 1.2 | 7.0 |
The property value
Value | Describe |
---|---|
outline-color | Specify the color of the border. See also: Possible values in outline-color. |
outline-style | Specify the style of the border. See also: Possible values in outline-style. |
outline-width | Specifies the width of the border. See also: Possible values in outline-width. |
inherit | Specifies that the settings of the outline property should be inherited from the parent element. |
Related articles
CSS tutorial: CSS Outline