想让 Font Awesome 图标可点击

新手上路,请多包涵

所以我是网络开发的新手,我正在尝试将字体很棒的图标链接到我的社交资料,但不确定如何做到这一点。我尝试使用 a href 标签,但它使所有图标都将我带到一个站点,而不是我想要的站点。这是代码:

  <i class="fa fa-dribbble fa-4x"></i>
 <i class="fa fa-behance-square fa-4x"></i>
 <i class="fa fa-linkedin-square fa-4x"></i>
 <i class="fa fa-twitter-square fa-4x"></i>
 <i class="fa fa-facebook-square fa-4x"></i>

我希望这些图标中的每一个都转到它们各自的个人资料。有什么建议么?

原文由 tiffanywhitedev 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 447
1 个回答

您可以将这些元素包装在锚标记中

像这样

<a href="your link here"> <i class="fa fa-dribbble fa-4x"></i></a>
<a href="your link here"> <i class="fa fa-behance-square fa-4x"></i></a>
<a href="your link here"> <i class="fa fa-linkedin-square fa-4x"></i></a>
<a href="your link here"> <i class="fa fa-twitter-square fa-4x"></i></a>
<a href="your link here"> <i class="fa fa-facebook-square fa-4x"></i></a>

注意:将 href="your link here" 替换为您想要的链接,例如 href="https://www.stackoverflow.com"

原文由 shyammakwana.me 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题