English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
outline-size Attributeoutlinewidth Attribute Usage and Example
width CSS attribute sets the width of the element outline. However, in many cases, the shorthand CSS attribute
More convenient to use and preferable. | medium |
---|---|
The following table provides usage instructions and version history of this attribute, as well as its usage syntax in JavaScript scripts. | Default Value: |
Applicable To: | All Elements |
Inheritance: | NoAnimatable: Yes.. |
Please refer to | Animation Attribute 2Version:3 |
CSS | ,object |
width Syntax Usage
outline-The syntax of this attribute is as follows:
width: thin | medium | thick | length | initial | inherit-The following examples demonstrate how to use outline
Example outline-p { outline-style: solid; width: thick;}/Test to see‹
›Note:-width Attribute must be declared beforeoutline-styleAttribute. The element must have an outline before the width of the outline can be set, because the outline-The default value of the style attribute is none.
The following table describes the values of this attribute.
Value | Description |
---|---|
thin | Thin Outline. |
medium | Medium Outline. |
thick | Thick Outline. |
length | Numeric values in units such as px, em, etc. Negative values are not allowed. |
inherit | If specified, the associated element adopts the outline of its parent element-width Attribute Value. |
outline-Browser Compatibility of width Attribute; the numbers in the table below represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.
|
Warning: Internet Explorer 7and earlier versions do not support this outline-width Attribute. IE8Supports this attribute, but requires an effective<!DOCTYPE>.
Please refer to the tutorials related to the following content:CSS Outline,CSS Border.
Related Attributes:outline,outline-style,outline-color.