Font Awesome Discord Icon won't show [duplicat

2019-09-20 13:26发布

问题:

This question is an exact duplicate of:

  • Font Awesome 5 - why icons like bitcoin, facebook, twitter aren't showing? 3 answers

I am trying to use a discord icon but for some reason it doesn't work. It just becomes blank. These are the ones that I am using right now and they are working correctly.

<li><a href="https://twitter.com/" class="fa fa-lg fa-twitter"></a></li>
<li><a href="https://github.com/" class="fa fa-lg fa-github"></a></li>
<li><a href="https://www.youtube.com/" class="fa fa-lg fa-youtube"></a></li>

Now when I try using this code <li><a href="https://discord.gg/" class="fa fa-lg fa-discord"></a> </li> The icon goes blank. Does anyone know how to fix this or why it is happening?

Link to discord icon: https://fontawesome.com/icons/discord?style=brands

回答1:

Here is a working Discord icon using only an <a>.

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">

<li>
  <a href="https://www.youtube.com/" class="fab fa-discord">
  </a>
</li>



回答2:

Your code:

<a href="https://discord.gg/" class="fa fa-lg fa-discord"></a>

Example from fontawesome page:

<i class="fab fa-discord"></i>

See the difference in class.

Edit: You are probably using older version of FA, there is no discord icon in version 4 or older, so update your FA to newest version (currently 5.8.1) and you will be ok.

Runnable code:

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">

<ul>
    <li><a href="https://discord.gg/" class="fab fa-discord"></a></li>
</ul>