目录

outline-color

描述 (Description)

outline-color属性设置元素周围outline-color

可能的值 (Possible Values)

  • color - 任何有效的颜色值。

  • invert - 轮廓执行绘制区域的颜色反转。

适用于 (Applies to)

所有HTML元素。

DOM语法 (DOM Syntax)

object.style.outlineColor = "red";

例子 (Example)

这是一个例子 -

<html>
   <head>
   </head>
   <body>
      <p style = "outline-width:thin; outline-style:solid;outline-color:red">
         This text is having thin solid red  outline.
      </p>
      <br />
      <p style = "outline-width:thick; outline-style:dashed;outline-color:#009900">
         This text is having thick dashed green outline.
      </p>
      <br />
      <p style = "outline-width:5px;outline-style:dotted;outline-color:rgb(13,33,232)">
         This text is having 5x dotted blue outline.
      </p>
   </body>
</html> 

这将产生以下结果 -

新页面打开
↑回到顶部↑
WIKI教程 @2018