目录

outline-width

描述 (Description)

outline-width属性定义元素周围的轮廓宽度。

可能的值 (Possible Values)

  • length - 任何长度单位。 此属性的长度单位可能不是负数。

  • thin - 比设置为medium的轮廓更薄的轮廓。

  • medium - 比设置为薄的轮廓更粗的轮廓,并且比设置为粗的轮廓更薄。

  • thick - 比设置为medium的轮廓更粗的轮廓。

适用于 (Applies to)

所有HTML元素。

DOM语法 (DOM Syntax)

object.style.outlineWidth = "thin";

例子 (Example)

这是一个例子 -

<html>
   <head>
   </head>
   <body>
      <p style = "outline-width:thin; outline-style:solid;">
         This text is having thin outline.
      </p>
      <br />
      <p style = "outline-width:thick; outline-style:solid;">
         This text is having thick outline.
      </p>
      <br />
      <p style = "outline-width:5px; outline-style:solid;">
         This text is having 5x outline.
      </p>
   </body>
</html> 

这将产生以下结果 -

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