css如何设置文本添加下划线

css文本添加下划线

text-decoration: underline;

text-decoration相关属性参数

参数 描述
none 默认。定义标准的文本。
underline 定义文本下的一条线。
overline 定义文本上的一条线。
line-through 定义穿过文本下的一条线。
blink 定义闪烁的文本。
inherit 规定应该从父元素继承 text-decoration 属性的值。

css如何设置文本添加下划线_第1张图片

// text-decoration-line参数
text-decoration-line:underline; //下划线
text-decoration-line:overline; //上划线
text-decoration-line:line-through; //中划线/删除线

//text-decoration-color 不做过多介绍(划线的颜色)
text-decoration-color:red; 

//text-decoration-style 划线的类型
text-decoration-style:solid; //实线
text-decoration-style:wavy; //波浪线
text-decoration-style:dashed; //虚线
text-decoration-style:dotted; //点线
text-decoration-style:double; //双线

你可能感兴趣的:(CSS,css,前端)