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 属性的值。 |
除注明外的文章,均为来源:老汤博客,转载请保留本文地址!
原文地址:https://tangjiusheng.cn/web/ask/690.html
原文地址:https://tangjiusheng.cn/web/ask/690.html
