Font Awesome Discord Icon won't show [duplicate]

梦想与她 提交于 2020-01-17 15:03:46

问题


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>


来源:https://stackoverflow.com/questions/55383316/font-awesome-discord-icon-wont-show

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!