超链接有双重下划线

时间:2017-01-24 08:23:55

标签: html css

我的网页上有超链接。出于某种原因,当我将鼠标悬停在链接上时,下面有2行。我已经能够在CSS中使用text-decoration: none删除其中一行。底线是问题。如果没有悬停,我注意到只有一条灰线(两条中较低的一条),但很难看到。见附图。

HTML

 <a href="http://www.mywebpage.com/" class="no-underline">My Web Page</a>

CSS

.no-underline:hover {text-decoration: none} 

enter image description here

2 个答案:

答案 0 :(得分:1)

如上面几点所示,它是边界。以下是我猜的作品。 @Dani提示检查元素,为此欢呼。

.no-underline:hover {text-decoration: none; border-bottom: 0}

下一篇文章必须谨慎行事。

答案 1 :(得分:1)

.no-underline:hover {text-decoration:none!important; border:none!important;} .no-underline {text-decoration:none!important; border:none!important;}