想要使Font Awesome图标可点击 [英] Want to make Font Awesome icons clickable
本文介绍了想要使Font Awesome图标可点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< 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>
我希望每个图标都转到其各自的配置文件。任何建议?
解决方案
您可以将这些元素封装在锚标记中
像这样
< a href =您的链接在这里> < i class =fa fa-dribbble fa-4x>< / i>< / a>
< a href =您的链接在这里> < i class =fa fa-behance-square fa-4x>< / i>< / a>
< a href =您的链接在这里> < i class =fa fa-linkedin-square fa-4x>< / i>< / a>
< a href =您的链接在这里> < i class =fa fa-twitter-square fa-4x>< / i>< / a>
< a href =您的链接在这里> < i class =fa fa-facebook-square fa-4x>< / i>< / a>
注意:将 href
替换为您想要的链接。
So I am new to web development and I am trying to link font awesome icons to my social profiles but am unsure of how to do that. I tried using an a href tag but it made all of the icons take me to one site instead of the one I wanted. Here is the code:
<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>
I'd like for each of these icons to go to their respective profiles. Any suggestions?
解决方案
You can wrap those elements in anchor tag
like this
<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>
Note: Replace href
with your desired link.
这篇关于想要使Font Awesome图标可点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文