CSS3 outline-offset
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The outline-offset
CSS property is used to set the space between an outline
and the border edge or simply edge of an element.
The following table summarizes the usages context and the version history of this property.
Default value: | 0 |
---|---|
Applies to: | All elements |
Inherited: | No |
Animatable: | yes. See animatable properties. |
Version: | New in CSS3 |
Syntax
The syntax of the property is given with:
The example below shows the outline-offset
property in action.
Example
Try this code »p {
border: 2px solid red;
outline: 2px solid green;
outline-offset: 10px;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
length | Specifies the distance the outline from the border edge. The default value is 0. Negative values place the outline inside the element. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element outline-offset property. |
Browser Compatibility
The outline-offset
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS Outline, CSS Border.
Related properties: outline
, outline-width
, outline-style
, outline-color
.