CSS outline-style property
Examples
Set the style of the outline:
{
outline-style: dotted;
}
In the bottom of this page for more examples.
Attribute definitions and instructions
outline (contour) is plotted on a line surrounding elements, located just outside the border edge.
outline-style property specifies the outline style.
Defaults: | none |
---|---|
inherit: | no |
version: | CSS2 |
JavaScript syntax: | object .style.outlineStyle = "dotted" |
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
outline-style | 1.0 | 8.0 | 1.5 | 1.2 | 7.0 |
Tips and Notes
outline around the element. It is padding around the elements. However, it is different from the border property.
Part of the outline is not an element size, and therefore the width and height attributes of the element does not include the width of the profile.
Property Value
value | description |
---|---|
none | default. No defined outline. |
dotted | Dotted contour definition. |
dashed | Define dashed outline. |
solid | Defined solid outline. |
double | Defined double contour. The value of outline-width of the lane width is equivalent to. |
groove | Define 3D groove profile. This effect depends on the outline-color value. |
ridge | The definition 3D projection groove profile. This effect depends on the outline-color value. |
inset | Define 3D concave edge profile. This effect depends on the outline-color value. |
outset | Define 3D convex edge contour. This effect depends on the outline-color value. |
inherit | Provisions should inherit outline style settings from the parent element. |
More examples
Set the outline style
This example demonstrates how to set the outline style.
related articles
CSS tutorial: CSS Outline
CSS Reference: Outline Properties