CSS outline-width property
Description of property definition and use
Outline is a line drawn around an element on the periphery of the edge of the border.
Outline-width specifies the width of the outline.
Note: Always declare the outline-style property before the outline-wicth property. An element can only change the width of its outline after it has been obtained.
Default: | medium |
---|---|
Inherited: | no |
Version: | CSS2 |
JavaScript syntax: | object .style.outlineWidth="thin" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
outline-width | 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 |
---|---|
thin | Specify the fine outline. |
medium | Default. Set a medium profile. |
thick | Provides a rough outline. |
length | Allows you to specify the value of the outline weight. |
inherit | Specifies that the setting of the outline width should be inherited from the parent element. |
Related articles
CSS tutorial: CSS Outline
CSS Reference Manual: Outline Properties