×
新网 > 建站推广 > 正文

css如何设置下划线为虚线

  • 作者:zccc
  • 来源:网络
  • 2020-11-18 12:05:06

css设置下划线为虚线的方法:可以利用text-decoration-style属性来进行设置,如【text-decoration-style: dotted;】。text-decoration-style属性用于规定线条如何显示。相关属

css设置下划线为虚线的方法:可以利用text-decoration-style属性来进行设置,如【text-decoration-style: dotted;】。text-decoration-style属性用于规定线条如何显示。

相关属性:

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

(学习视频分享:css视频教程)

语法:

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

属性值:

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

double 线条将显示为双线。

dotted 线条将显示为点状线。

dashed 线条将显示为虚线。

wavy 线条将显示为波浪线。

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

inherit 从父元素继承该属性。

举例:

给a标签添加虚线下划线

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

//css
a{
    text-decoration-style: dotted;
}

相关推荐:CSS教程

  • 相关专题

免责声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,也不承认相关法律责任。如果您发现本社区中有涉嫌抄袭的内容,请发送邮件至:operations@xinnet.com进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

免费咨询获取折扣

Loading