CSS outline-offset รายการ
- หน้าก่อน outline-color
- หน้าต่อไป outline-style
definition and usage
the outline-offset property 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
specifies the outline at 15 pixels outside the border edge:
div { border:2px solid black; outline:2px solid red; outline-offset:15px; }
CSS 语法
outline-offset: length|inherit;
attribute value
value | description |
---|---|
length | distance from the outline to the border edge. |
inherit | specifies that the value of the outline-offset property should be inherited from the parent element. |
technical details
default value: | 0 |
---|---|
inheritance: | no |
版本: | CSS3 |
JavaScript 语法: | object.style.outlineOffset="15px" |
การสนับสนุนบราวเซอร์
ตัวเลขในตารางบอกเล่าถึงเวอร์ชันบราวเซอร์แรกที่สนับสนุนคุณสมบัตินี้อย่างเต็มที่。
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
4.0 | 15.0 | 3.5 | 3.1 | 10.5 |
- หน้าก่อน outline-color
- หน้าต่อไป outline-style