使用 CSS 设置轮廓宽度

cssweb developmentfront end technology更新于 2025/8/22 17:48:17

outline-width 属性用于设置轮廓的宽度。其值应为长度,或thin、medium或 thick值之一,类似于 border-width 属性。

示例

<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:dashed;">
         This text is having thick outline.
      </p>
      <br />
      <p style = "outline-width:5px; outline-style:dotted;">
         This text is having 5x outline.
      </p>
   </body>
</html>

相关文章


有用资源