字体真棒图标无法用作链接 [英] Font Awesome icons not working as links

查看:77
本文介绍了字体真棒图标无法用作链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的字体超赞图标未链接到我在a标签上设置href的位置.实际上,当我检查它们时,a标签上没有href.我有一些演示代码供您查看,但是在演示代码上,它在检查时确实显示了href,只是没有链接到页面.也许如果此代码是固定的,它将解决我的问题.谢谢

My font awesome icons aren't linking to where I set the href on the a tag. In fact when I inspect them there is no href on the a tag. I have some demo code for you to look at, but on the demo code it does show the href when inspecting it just doesn't link to the page. Maybe if this code is fixed it will fix my issue. Thanks

<a href="https://www.google.co.uk/">
  <i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i>
</a>

<script src="https://use.fontawesome.com/7c396dc5cb.js"></script>

https://jsfiddle.net/znvfbu9g/

推荐答案

a标签提供target属性.

以下方面的内容:

<a target="_blank" href="https://www.google.co.uk/">
  <i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i>
</a>

检查更新的小提琴.

这篇关于字体真棒图标无法用作链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆