a标签下划线

页面中有一处box中的a标签都被加上了下划线,查找元素却没有找到css中的underline。

原因是 <a>标签默认是有下划线的,而一般看到的<a>标签链接中的下划线都被覆盖掉了,所以误以为<a>标签的默认状态是没有下划线的,出现下划线是有css另外渲染的。

其实下划线才是<a>标签的默认状态

在head中加上下面一段覆盖掉<a>标签的下划线

<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
原文地址:https://www.cnblogs.com/huim/p/9810399.html