CSS outline-style
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The outline-style
CSS property sets the style of the outline of an element. However, in many cases the shorthand propertiey outline
is more convenient to use and preferable.
The following table summarizes the usages context and the version history of this property.
Default value: | none |
---|---|
Applies to: | All elements |
Inherited: | No |
Animatable: | No. See animatable properties. |
Version: | CSS 2, 3 |
Syntax
The syntax of the property is given with:
The example below shows the outline-style
property in action.
Example
Try this code »p {
outline-style: double;
outline-width: 5px;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
none |
No outline will be displayed. This is default value. |
dotted |
Displays the outline as a series of dots. |
dashed |
Displays the outline as a series of short line segments i.e. dashes. |
solid |
Displays the outline as a single solid line. |
double |
Displays the outline as a two parallel solid lines with some space between them. The sum of the two lines and the space between them equals the value of outline-width . |
groove |
Displays the outline as it were carved into the canvas. It gives the impression of 3D that is typically achieved by creating a shadow from two colors that are slightly lighter and darker than the outline-color . |
ridge |
Displays the outline that has the opposite effect of groove . It also gives the impression of 3D, the outline looks as though it were coming out of the canvas. |
inset |
Displays the outline that makes the element's box look as though it were embedded in the canvas. It gives the impression of 3D that is typically achieved by creating a shadow from two colors that are slightly lighter and darker than the outline-color . |
outset |
Displays the outline that has the opposite effect of inset . It also gives the impression of 3D, the outline makes the box look as though it were coming out of the canvas. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element outline-style property. |
Browser Compatibility
The outline-style
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS outline, CSS Border.
Related properties: outline
, outline-color
, outline-width
.