当前位置:首页 > 千层云服务器 > 正文

css中怎么添加虚线下划线

css中添加虚线下划线:通过“text-decoration-style”属性来进行设置下划线样式,比如在css中添加“text-decoration-style: dotted;”样式代码来设置下划线样式为虚线,而“text-decoration-style”属性主要用于设置线条以什么样式类型显示。

css中怎么添加虚线下划线

相关属性:

text-decoration-style 属性规定线条如何显示。

语法:

text-decoration-style:solid|double|dotted|dashed|wavy|initial|inherit;

属性值:


solid 默认值。线条将显示为单线。


double 线条将显示为双线。


dotted 线条将显示为点状线。


dashed 线条将显示为虚线。


wavy 线条将显示为波浪线。


initial 设置该属性为它的默认值。


inherit 从父元素继承该属性。


举例:

给a标签添加虚线下划线

<ahref="#">css如何设置下划线虚线</a>

//css

a{

text-decoration-style:dotted;

}

如果您对该产品感兴趣,请填写办理(客服微信:xiaoxiongyidong)

为您推荐:

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

在线客服