当前第2页 返回上一页
text-decoration作为速记属性
1 2 3 4 5 6 7 8 9 | text-decoration可以与text-decoration-line、text-decoration-style和text-decoration-color组合使用,作为一个速记属性
.fancy-underline {
text-decoration-line: underline;
text-decoration-style: wavy;
text-decoration-color: red;
text-decoration: underline wavy red;
}
|
示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | <!DOCTYPE html>
<html>
<head>
<meta charset= "UTF-8" >
<style>
.underline {
text-decoration: underline;
}
.overline {
text-decoration: overline;
}
.strikethrough {
text-decoration: line-through;
}
.multiple {
text-decoration: underline overline line-through;
}
.blink {
text-decoration: blink;
}
.wavy {
text-decoration: red underline overline wavy;
}
body {
padding: 1em 2em;
}
</style>
</head>
<body style= "text-align:center" >
<p class = "underline" >text-decoration: underline;</p>
<p class = "overline" >text-decoration: overline;</p>
<p class = "strikethrough" >text-decoration: line-through;</p>
<p class = "multiple" >text-decoration: underline overline line-through;</p>
<p class = "blink" >text-decoration: blink;</p>
<p class = "wavy" >text-decoration: red underline overline wavy;</p>
</body>
</html>
|
效果图:

从上例可以看出,可以将underline,overline或line-through组合在一个以空格分隔的列表中,以添加多个装饰线效果。
【推荐学习:css视频教程】
以上就是css设置文字删除线的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
css按钮的大小设置
css怎么设置溢出隐藏
css如何实现水平居中
css哪些属性可以继承
css怎么隐藏按钮
css animation-duration属性怎么用
css元素如何重叠?
css的伪类有哪些
css如何实现不显示元素
css中的类选择器有什么用
更多相关阅读请进入《css》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » css设置文字删除线