简体   繁体   English

FontAwesome 5个图标未加载最新的chrome

[英]FontAwesome 5 icons not loading in latest chrome

I am working in a ASP.NET Core application. 我在ASP.NET核心应用程序中工作。 I am using Bulma framework and I wish to add FontAwesome icons. 我正在使用Bulma框架,我希望添加FontAwesome图标。

I went here and grabbed a CDN link. 去了这里 ,抓住了一个CDN链接。 When I navigate to the page, I don't see any icons. 当我导航到页面时,我看不到任何图标。

没有图标

HTML HTML

<p>Testing: <i class="fab fa-anchor"></i></p>

What am I missing? 我错过了什么? Adding these to my ` section didn't help either. 将这些添加到我的`部分也没有帮助。

<meta http-equiv="Content-Security-Policy" content="style-src *; font-src *; default-src *">
<meta http-equiv="X-Content-Security-Policy" content="style-src *; font-src *; default-src *">
<meta http-equiv="X-WebKit-CSP" content="style-src *; font-src *; default-src *">

try adding use.fontawesome.com to you content security policy. 尝试将use.fontawesome.com添加到内容安全策略中。

example: 例:

font-src use.fontawesome.com

your content security policy rule might have to be changed on the server if its configured there. 如果在服务器上配置了内容安全策略规则,则可能必须在服务器上更改该规则。

if there is already a value for font-src, then separate the value above with a space. 如果已经有font-src的值,则将上面的值与空格分开。

font-src example.com use.fontawesome.com

You should try run on web server :D 您应该尝试在Web服务器上运行:D

Or you ca do somthing like that: 或者你可以这样做:

  1. copy css code for local usage 复制用于本地使用的css代码
  2. save in to file for ex: awesome.css 保存到ex:awesome.css的文件中
  3. link file in to your head 将文件链接到你的脑海

i don't know if this is newest one but you can copy that and try: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css 我不知道这是否是最新的,但您可以复制并尝试: https//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css

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

Will be inside :D i hope it will help xD 将在里面:D我希望它能帮助xD

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

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