简体   繁体   中英

Font Awesome icons not working as links

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/

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 .

Do you have the latest CDN attached to you page to display the icons?

http://fontawesome.io/get-started/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM