简体   繁体   English

字体很棒的圈子没有出现

[英]font-awesome circles not showing up

in my package.json, I have 在我的package.json中,我有

 "dependencies": {
    "font-awesome": "^4.7.0"
  }

in my html, I have 在我的html中,我有

<link rel="stylesheet" type="text/css" href="../node_modules/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">

If I comment out the second link, none of my font-awesome icons show up and I only get empty rectangles. 如果我注释掉第二个链接,那么我的字体真棒图标都不会显示,并且我只会得到空矩形。

in my css, I have 在我的CSS中,我有

fas fa-circle

Anyone seeing what I am doing wrong? 有人看到我在做什么错吗?

This is for version 5 and above 这适用于版本5及更高版本

In your HTML 在您的HTML中

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">

Then, Use this code 然后,使用此代码

<span><i class="fas fa-circle"></i></span> // for Solid
<span><i class="far fa-circle"></i></span> // for Regular

And, This is for version 4.7.0 并且,这是用于版本4.7.0

In your HTML, 在您的HTML中,

 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

Then, 然后,

<span><i class="fa fa-circle-thin" aria-hidden="true"></i></span>
<span><i class="fa fa-circle" aria-hidden="true"></i></span>
<span><i class="fa fa-circle-o" aria-hidden="true"></i></span>

for version 4.7.0 installed locally, I should use fa instead of fas. 对于本地安装的4.7.0版本,我应该使用fa而不是fas。

    <link rel="stylesheet" type="text/css" href="../node_modules/font-awesome/css/font-awesome.css">

and the package is 包裹是

    "font-awesome": "^4.7.0"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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