文本装饰风格 | text-decoration-style (Text Decoration) - CSS 中文开发手册 - Break易站
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了文本装饰风格 | text-decoration-style (Text Decoration) - CSS 中文开发手册 - Break易站,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1759字,纯文字阅读大概需要3分钟。
内容图文
文本装饰风格 | text-decoration-style (Text Decoration) - CSS 中文开发手册
该text-decoration-style CSS属性设置由text-decoration-line指定的线的样式。该样式适用于所有指定的线条,但没有办法为text-decoration-line定义的每个线条设定不同的样式。当要一次设置多个线条装饰属性时,使用text-decoration简写属性可能会更方便。
/* Keyword values */ text-decoration-style: solid; text-decoration-style: double; text-decoration-style: dotted; text-decoration-style: dashed; text-decoration-style: wavy; /* Global values */ text-decoration-style: inherit; text-decoration-style: initial; text-decoration-style: unset;
如果指定的修饰具有特定的语义含义,如直通线意味着某些文本已被删除,那么鼓励作者使用HTML标记(如,<del>或<s>)来表示该含义。由于浏览器在某些情况下可能会禁用样式,所以在这种情况下,采用HTML标记可以使得该语义并不会消失。
Initial value |
solid |
---|---|
Applies to |
all elements. It also applies to ::first-letter and ::first-line. |
Inherited |
no |
Media |
visual |
Computed value |
as specified |
Animation type |
discrete |
Canonical order |
the unique non-ambiguous order defined by the formal grammar |
语法
可能值
solid——绘制单行实线
double——绘制双行实线
dotted——绘制一条虚线(点状)
dashed——绘制一条虚线(短线状)
wavy——绘制一条波浪线
-moz-none——不绘制线,非标准接口,使用text-decoration-line: none作为代替。
形式语法
solid | double | dotted | dashed | wavy
实例
.example { -moz-text-decoration-line: underline; -moz-text-decoration-style: wavy; -moz-text-decoration-color: red; -webkit-text-decoration-line: underline; -webkit-text-decoration-style: wavy; -webkit-text-decoration-color: red; }
.wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; }
<p class="wavy">This text has a wavy red line beneath it.</p>
原文:https://www.cnblogs.com/breakyizhan/p/13216314.html
内容总结
以上是互联网集市为您收集整理的文本装饰风格 | text-decoration-style (Text Decoration) - CSS 中文开发手册 - Break易站全部内容,希望文章能够帮你解决文本装饰风格 | text-decoration-style (Text Decoration) - CSS 中文开发手册 - Break易站所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。