The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient.
Outlines differ from borders in the following ways:
Outlines do not take up space, they are drawn above the content.
Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. But e.g. Opera draws a non-rectangular shape around a construct
Initialthe concatenation of the initial values of its longhand properties:
outline-color: is itself a shorthand, its initial value is the concatenation of its own longhand properties
outline-width: is itself a shorthand, its initial value is the concatenation of its own longhand properties
outline-style: is itself a shorthand, its initial value is the concatenation of its own longhand properties
Applies toall elements
Inheritedno
Mediavisual, interactive
Computed Valueas each of the properties of the shorthand:
outline-color: For the keyword invert, the computed value is invert. For the color value, if the value is translucent, the computed value will be the rgba() corresponding one. If it isn’t, it will be the rgb() corresponding one. The transparent keyword maps to rgb(0,0,0).
outline-width: an absolute length; if the keyword none is specified, the computed value is 0
outline-style: as specified
Animatableas each of the properties of the shorthand: