精美的图标,在链接内编码,显示在可点击区域*之后*
我的页面上有一个链接,它只是一个后退箭头。我将图标直接放在我的元素中,如下所示:
<a href="../../index.html" target="_blank"><i class="fa-solid fa-arrow-left"></i></a>
但在页面上,它们就像彼此跟随一样。可点击区域位于我的图标之前和上方。我尝试复制此处。 (不确定图标是否正确显示,但问题已重现) 我在另一篇文章中看到添加目标可以解决某些问题,但对我来说却没有。 有人有想法吗?
I have a link on my page that is simply a back arrow. I put the icon directly in my element, like this:
<a href="../../index.html" target="_blank"><i class="fa-solid fa-arrow-left"></i></a>
but on the page it's as if they follow each other. The clickable area is before and above my icon. I tried to replicate here. (not sure the icon shows up properly, but the problem is reproduced)
I saw in another post that adding a target fixes the problem for some, but it didn't for me.
Does anyone have an idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过调整锚元素的宽度来修复它。
I fixed it by playing with the width of my anchor element.