取消下划线与显示下划线设置

 

a标签下划线和勾销下划线样式text-decoration配置篇

以下介绍DIV CSS组织时刻,默许情况下A超链接锚文本下划线几种情况兼容各阅读器设置装备摆设。

1、取消A默认下划线
在CSS代码中最前面设置CSS以下:

a{text-decoration:none}

多么就可设置默认状况下超链接标签A字体无论是默许情况下照常鼠标悬停超链接字体均不闪现下划线。

2、兼容各大涉猎器默许A超链接全显示下划线
岂论默认状况下仍是鼠标通过悬停a链接形式均表示下划线CSS代码:

a{ text-decoration:underline}

3、A默许体现下划线,鼠标悬停通过下划线失落
默认超链接字体文字透露表现下滑线,鼠标通过下划线隐没CSS代码:

a{ text-decoration:underline}
a:hover{ text-decoration:none}

4、A默认不表现下划线,鼠标悬停经过表现下划线

a{ text-decoration:none}
a:hover{ text-decoration:underline}

以上是默认情况下几种超链接a标具名体下划线显露与不表现几种情况配置。

a text-decoration缩减应用:

.abc a{ text-decoration:none}
.abc a:hover{ text-decoration:underline}

这里CSS代码浸染,指定class=abc盒子内a超链接默认字体不表示下划线,鼠标悬停时展现下划线,网页中非class=abc盒子内超链接锚文本字体可否显露下划线不受影响。