CSS3 outline-offset property
Examples
Specifies outline 15px outside the border edge:
div
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
try it"
Browser Support
Figures in the table represent the first browser to support the version number of the property.
Immediately following the digital -webkit-, -ms- or -moz- ago in support of the prefix attribute first browser version number.
属性 | |||||
---|---|---|---|---|---|
outline-offset | 4.0 | 不兼容 | 3.5 | 3.1 | 10.5 |
Attribute definitions and instructions
outline-offset property to offset contour outside the framework of the border edge
Outlines differ from borders in two ways:
- Outlines do not take up space
- Outlines may be non-rectangular
Defaults: | 0 |
---|---|
inherit: | no |
version: | CSS3 |
JavaScript syntax: | object .style.outlineOffset = "15px" |
grammar
outline-offset:length|inherit:
value | description |
---|---|
length | From the contour of the edge of the border. |
inherit | Provisions shall inherit the parent element value outline-offset property. |
related articles
CSS3 tutorial: CSS3 the User Interface