Skip to content

outline ​

描述 ​

outline 属性是一种简写属性,用于在单个规则中设置一个或多个单独的outline-style, outline-width, outline-color。在大多数情况下,使用此快捷方式更可取且更方便。

效果展示 ​

语法 ​

css
outline: [ <outline-color> || <outline-style> || <outline-width> ] | inherit
/* style */
outline: solid;

/* color | style */
outline: #f66 dashed;

/* style | width */
outline: inset thick;

/* color | style | width */
outline: green solid 3px;

/* Global values */
outline: inherit;
outline: initial;
outline: revert;
outline: revert-layer;
outline: unset;

值 ​

  • <outline-color> 请参阅 outline-color CSS 属性以获取值。
  • <outline-style> 请参阅 outline-style CSS 属性以获取值。
  • <outline-width> 请参阅 outline-width CSS 属性以获取值。