CSS outline-style 属性
cssweb developmentfront end technology更新于 2025/8/23 19:24:17
outline-style 属性指定元素外边框的样式。它可以采用以下值之一 −
- none − 无边框。 (相当于 outline-width:0;)
- solid − 轮廓是一条实线。
- dotted − 轮廓是一系列点。
- dashed − 轮廓是一系列短线。
- double − 轮廓是两条实线。
- groove − 轮廓看起来像是刻在页面上的。
- ridge − 轮廓看起来与 groove 相反。
- inset − 轮廓使盒子看起来像是嵌入在页面中。
- outset − 轮廓使盒子看起来像是从画布。
- hidden − 与 none 相同。
示例
您可以尝试运行以下代码来实现 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>
相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

