CSS uiteensetting offset
CSS uiteensetting offset
Die outline-offset
eiendom voeg spasie tussen 'n buitelyn en die rand/grens van 'n element by. Die spasie tussen 'n element en sy buitelyn is deursigtig.
Die volgende voorbeeld spesifiseer 'n buitelyn 15px buite die grensrand:
Hierdie paragraaf het 'n buitelyn 15px buite die randrand.
Voorbeeld
p {
margin: 30px;
border: 1px solid black;
outline:
1px solid red;
outline-offset: 15px;
}
Die volgende voorbeeld toon dat die spasie tussen 'n element en sy buitelyn deursigtig is:
Hierdie paragraaf het 'n buitelyn van 15px buite die rand.
Voorbeeld
p {
margin: 30px;
background:
yellow;
border: 1px solid black;
outline:
1px solid red;
outline-offset: 15px;
}
Alle CSS Outline-eienskappe
Property | Description |
---|---|
outline | A shorthand property for setting outline-width, outline-style, and outline-color in one declaration |
outline-color | Sets the color of an outline |
outline-offset | Specifies the space between an outline and the edge or border of an element |
outline-style | Sets the style of an outline |
outline-width | Sets the width of an outline |