问题
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/
回答1:
Provide a target
attribute to your a
tag.
Something on the lines of:
<a target="_blank" href="https://www.google.co.uk/">
<i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i>
</a>
Check updated fiddle.
回答2:
Do you have the latest CDN attached to you page to display the icons?
http://fontawesome.io/get-started/
来源:https://stackoverflow.com/questions/43320998/font-awesome-icons-not-working-as-links