微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css怎么去掉下划线样式

css去掉下划线样式的方法是,设置属性【text-decoration: none;】。如果我们要为文本添加样式,如红色波浪线,可以设置属性【text-decoration: underline red;】。

本文操作环境:windows10系统、css 3、thinkpad t480电脑。

如果我们要取消文本中的下划线样式,可以设置属性text-decoration: none,下面我们来介绍下text-decoration属性

text-decoration 属性规定添加到文本的修饰,下划线、上划线、删除线等。

text-decoration: none;                     
/*没有文本装饰*/
text-decoration: underline red;            
/*红色下划线*/
text-decoration: underline wavy red;       
/*红色波浪形下划线*/

举些例子:

h1.under {
    text-decoration: underline;
}
h1.over {
    text-decoration: overline;
}
p.line {
    text-decoration: line-through;
}
p.blink {
    text-decoration: blink;
}
a.none {
    text-decoration: none;
}
p.underover {
    text-decoration: underline overline;
}

学习视频分享css视频教程

原文地址:https://www.jb51.cc/css/1205827.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。