在CSS中,可以使用text-decoration:none来去掉超链接的下划线。text-decoration属性规定添加到文本的修饰,而none值定义标准的文本,设置该值即可去掉下划线。
示例:
<html> <head> </head> <body> <p><a href="具体连接地址">这是一个链接</a></p> </body> </html>
效果图:
设置text-decoration属性后:
a {text-decoration: none}
效果图:
text-decoration属性:
text-decoration 属性规定添加到文本的修饰。
注释:修饰的颜色由 "color" 属性设置。
说明
这个属性允许对文本设置某种效果,如加下划线。如果后代元素没有自己的装饰,祖先元素上设置的装饰会“延伸”到后代元素中。不要求用户代理支持 blink。
text-decoration属性设置可能值:
text-decoration:none 无装饰,通常对html下划线标签去掉下划线样式
text-decoration:underline 下划线样式
text-decoration:line-through 删除线样式-贯穿线样式
text-decoration:overline 上划线样式
以上就是css如何去掉下划线?的详细内容,更多请关注0133技术站其它相关文章!