CSS outline-offset 属性
- ang nakaraan na pahina outline-color
- 下一页 outline-style
Definition and usage
The outline-offset attribute offsets the outline and draws it at the edge of the border.
The outline is different from the border in two aspects:
- The outline does not occupy space
- The outline may be non-rectangular
See also:
CSS tutorial:CSS 用户界面
HTML DOM reference manual:outlineOffset property
Example
Specify the outline at 15 pixels outside the border edge:
div { border:2px solid black; outline:2px solid red; outline-offset:15px; }
CSS syntax
outline-offset: length|inherit;
Attribute value
Value | Description |
---|---|
length | Distance from the outline to the border edge. |
inherit | It is specified that the value of the outline-offset attribute should be inherited from the parent element. |
Technical details
Default value: | 0 |
---|---|
Inheritance: | no |
Version: | CSS3 |
JavaScript grammar: | object.style.outlineOffset="15px" |
browser support
Ang numero sa tabliya ay nagtutukoy sa unang bersyon ng browser na ganap na sumusuporta sa katangian na iyon.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
4.0 | 15.0 | 3.5 | 3.1 | 10.5 |
- ang nakaraan na pahina outline-color
- 下一页 outline-style