outline-offset
概要
Syntax
css
/* <length> values */
outline-offset: 3px;
outline-offset: 0.2em;
/* Global values */
outline-offset: inherit;
outline-offset: initial;
outline-offset: unset;
Values
Formal syntax
outline-offset =
<length>
Examples
css
p {
outline: dashed thin;
/* Move the outline 10px away from the border */
outline-offset: 10px;
border: 1px solid black;
}
Html
html
<p>outline: offset 10px. Border is solid and outline is dashed</p>
上面的代码将产生以下效果:
另一个例子:
outline: multiple offsets;
Specifications
Specification |
---|
CSS Basic User Interface Module Level 4 # outline-offset |
Browser compatibility
BCD tables only load in the browser