语法:
outline-width: thin | medium | thick | <length>
相关属性:outline , outline-color , outline-style , outline-offset
取值:
- thin:
- 定义细轮廓。
- medium:
- 默认。定义中等的轮廓。
- thick:
- 定义粗的轮廓。
- <length> :
- 定义轮廓粗细的值。
说明:
outline-width 属性设置元素整个轮廓的宽度,只有当轮廓样式不是 none 时,这个宽度才会起作用。如果样式为 none,宽度实际上会重置为 0。不允许设置负长度值。参见outline属性。
兼容性:
类型 | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
版本 | (×)IE6 | (√)Firefox 3.0.10 | (√)Chrome 2.0.x | (√)Opera 9.64 | (√)Safari 4 |
(×)IE7 | (√)Firefox 3.5 | ||||
(√)IE8 | |||||
示例:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="utf-8" /> <meta name="robots" content="all" /> <meta name="author" content="Tencent-ISRD" /> <meta name="Copyright" content="Tencent" /> <title>outline-width</title> </head> <body> <div style="width: 160px;padding: 10px;height: 30px;border: 2px solid black;outline-color:#897048;outline-style:groove;outline-width:2px;outline-offset: 5px;">这绘制的是一个轮廓边框</div> </body> </html>