我使用图像标记中的一个图标作为指向我的LinkedIn的链接,并为我的LinkedIn使用另一个图标。每个图标都在一个锚标记中。
当代码如下:
<a href="temp.html" target="_blank">
<img src="linkedinicon.png">
</a>
<a href="https://github.com/victoriensukarieh" target="_blank" title="Github">
<img src="files/img/githubicon.png" height="30px" width="30px" style="border: none;">
</a>浏览器显示一个"_“,在developer工具中显示一个”空格“。
像这样格式化代码可以解决这个问题:
<a href="temp.html" target="_blank"><img src="linkedinicon.png"></a>
<a href="https://github.com/victoriensukarieh" target="_blank" title="Github">
<img src="files/img/githubicon.png" height="30px" width="30px" style="border: none;">
</a>这个问题可以在这里看到,JSFiddle
有人知道为什么吗?
发布于 2021-01-09 16:28:31
这是因为你的链接有一个下划线的风格,你确实,从技术上来说,在那里有空格。
element.style {
}
user agent stylesheet
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
text-decoration: underline;
}这不是一个真正的bug,但它就在它的边缘。基本上,您想要覆盖链接样式来使用text-decoration: none;,这不应该是一个问题。你可能需要覆盖所有的州,如:访问和:悬停等.
解决方案:<a style="text-decoration: none;">...</a>
https://stackoverflow.com/questions/65644802
复制相似问题