我被指示让网站上的链接具有与字体颜色不同的颜色下划线。这一切看起来都很简单,使用border-bottom
如下,除了链接的图像现在也加了下划线。
有没有办法在不使用 JS 的情况下停止发生?
a{
color: #6A737B;
text-decoration: none;
}
a:hover{
border-bottom: 1px solid #C60B46;
text-decoration: none;
}
一个例子 - 现在将鼠标悬停在下面的图像上会添加border-bottom
CSS 样式,这是我不想要的 -
<a title="Dyne Drewett" href="http://test.dynedrewett.com">
<img class="attachment-full" width="202" height="78" alt="Dyne Drewett Solicitors" src="http://test.example.com/Website-Header.png">
</a>