html怎么去掉a标签的下划线(a标签下划线去除代码)

html怎么去掉a标签的下划线?html去掉a标签下划线的方法有:

1、通过“a{ text-decoration: none; }”设置a标签的默认状态去除下划线;

2、通过“a:visited{ text-decoration: none; }”去除a标签访问过后的下划线等等。

a标签下划线去除代码如下:

a{ text-decoration: none; }    //这个是设置a标签的默认状态去除下划线
a:visited{ text-decoration: none; }    //这个是设置a标签的访问过后的状态去除下划线
a:hover { text-decoration: none; }    //这个是设置a标签的鼠标覆盖状态去除下划线
a:active{ text-decoration:none; }    //这个是设置a标签的活跃状态去除下划线

附:CSS text-decoration属性

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

text-decoration 属性是以下三种属性的简写:

1)text-decoration-line

2)text-decoration-color

3)text-decoration-style

text-decoration属性值如下:

描述
none 默认。定义标准的文本。
underline 定义文本下的一条线。
overline 定义文本上的一条线。
line-through 定义穿过文本下的一条线。
blink 定义闪烁的文本。
inherit 规定应该从父元素继承 text-decoration 属性的值。
版权声明:
作者:Joker 链接:https://456787.xyz/archives/848
文章版权归作者所有,转载请注明出处。
THE END
分享
二维码
打赏
< <上一篇
下一篇>>