在css中可以通过text-decoration属性设置删除线颜色,其设置语句如“text-decoration: line-through red;”,其中red参数则表示删除线的颜色。
本文操作环境:Windows7系统、css3版,DELL G3电脑
text-decoration 属性规定添加到文本的修饰,下划线、上划线、删除线等。
text-decoration 属性是以下三种属性的简写:
text-decoration-linetext-decoration-colortext-decoration-style
登录后复制
语法
立即学习“前端免费学习笔记(深入)”;
/*关键值*/text-decoration: none; /*没有文本装饰*/text-decoration: underline red; /*红色下划线*/text-decoration: underline wavy red; /*红色波浪形下划线*/text-decoration: line-through red; /*红色删除线*//*全局值*/text-decoration: inherit;text-decoration: initial;text-decoration: unset;
登录后复制
属性值
none默认。定义标准的文本。
underline定义文本下的一条线。
overline定义文本上的一条线。
line-through定义穿过文本下的一条线。
blink定义闪烁的文本。
inherit规定应该从父元素继承 text-decoration 属性的值。
推荐学习:《css视频教程》
以上就是css删除线颜色怎么设置的详细内容,更多请关注【创想鸟】其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。
发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2950027.html