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

时间:2018-03-25 18:51:59

标签: css font-awesome font-awesome-5

Is it only me that cannot render bitcoin and facebook icons in version 5.0.8 ?

<link rel="stylesheet" type="text/css" href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css">
<i class="fa fa-btc"></i>
<i class="fa fa-bitcoin"></i>
<i class="fa fa-facebook"></i>
<i class="fa fa-facebook-f"></i>

4 个答案:

答案 0 :(得分:0)

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" integrity="sha384-3AB7yXWz4OeoZcPbieVW64vVXEwADiYyAEhwilzWsLw+9FgqpyjjStpPnpBO8o8S" crossorigin="anonymous">
<i class="fab fa-btc"></i>
<i class="fab fa-bitcoin"></i>

答案 1 :(得分:0)

You need to load all the icon type as the bitcoin belong to the brand ones. As you can see below you can choose pack of icon you want to load: https://fontawesome.com/get-started/web-fonts-with-css

enter image description here

You also need to use fab not fa. https://fontawesome.com/how-to-use/web-fonts-with-css

enter image description here

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" >
<i class="fab fa-btc"></i>
<i class="fab fa-bitcoin"></i>
<i class="fab fa-facebook"></i>
<i class="fab fa-facebook-f"></i>

答案 2 :(得分:0)

You also need to use the brands.css stylesheet in font-awesome 5.0.8. Additionally, you need to make sure your class names are up to date. Try the snippet below:

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/brands.css" integrity="sha384-IiIL1/ODJBRTrDTFk/pW8j0DUI5/z9m1KYsTm/RjZTNV8RHLGZXkUDwgRRbbQ+Jh" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css" integrity="sha384-q3jl8XQu1OpdLgGFvNRnPdj5VIlCvgsDQTQB6owSOHWlAurxul7f+JpUOVdAiJ5P" crossorigin="anonymous">

<i class="fab fa-btc"></i>
<i class="fab fa-bitcoin"></i>

Alternatively, you can just use the all.css stylesheet to include all the styles

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" integrity="sha384-3AB7yXWz4OeoZcPbieVW64vVXEwADiYyAEhwilzWsLw+9FgqpyjjStpPnpBO8o8S" crossorigin="anonymous">

答案 3 :(得分:0)

这可以在不到2分钟的时间内解决所有fontawesome字体类型的问题。用/font-awesome/5.13.0/css/all.min.css和font-awesome / 5.13.0 / js / fontawesome简单替换/font-awesome/5.13.0/css/fontawesome.min.css。带有/font-awesome/5.13.0/js/all.min.js的min.js可以解决此问题。 https://youtu.be/_GV_pEmLCLU