精美的图标,在链接内编码,显示在可点击区域*之后*

发布于 2025-01-13 09:47:43 字数 370 浏览 2 评论 0原文

我的页面上有一个链接,它只是一个后退箭头。我将图标直接放在我的元素中,如下所示:

     <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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甚是思念 2025-01-20 09:47:43

我通过调整锚元素的宽度来修复它。

I fixed it by playing with the width of my anchor element.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文