使用 CSS 设置轮廓的线条样式

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

 outline-style 属性指定元素周围线条的样式。

示例

您可以尝试运行以下代码来实现 outline-style 属性 −

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

相关文章


有用资源