outline-style属性指定围绕元素的线条的样式。它可以采用以下值之一 –
- 无 – 无边框。 (相当于轮廓宽度:0;)实线 – 轮廓是一条实线。点线 – 轮廓是一系列点。虚线 – 轮廓是一系列短线。双 – 轮廓是两条实线线条。凹槽 – 轮廓看起来好像是刻在页面上的。脊 – 轮廓看起来与凹槽。插入 – 轮廓使框看起来像是嵌入在页面中。开始 – 轮廓使框看起来像嵌入在页面中。框看起来像是从画布中出来的。隐藏 – 与无相同。
示例
您可以尝试运行以下代码来实现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 轮廓样式属性的详细内容,更多请关注www.92cms.cn其它相关文章!






