CSS Outline-width attribute

Examples

Set the width of the outline:

p { outline-style: dotted ; Outline-width: 5 px ;}


Attribute definitions and instructions

outline (contour) is plotted on a line surrounding elements, located just outside the border edge.

outline-width Specifies the width of the outline.

Note: Always declare outline-style outline-width property before the property.Only after winning the contour element to change the width of the profile.

Defaults: medium
inherit: no
version: CSS2
JavaScript syntax: object .style.outlineWidth = "thin"


Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
outline-width 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
thin Predetermined low profile.
medium default. Medium predetermined contour.
thick The predetermined thickness profile.
length It allows you to specify the thickness contour value.
inherit Provisions set contour width should inherit from the parent element.


related articles

CSS tutorial: CSS Outline

CSS Reference: Outline Properties