【发布时间】:2020-09-21 23:00:39
【问题描述】:
我正在使用 Angular 6 应用程序。在 index.html 文件中,我们有很棒的字体参考,例如:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC" crossorigin="anonymous">
现在,我正在尝试将 fontawesome 更新到 5.10.2 版本,例如:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.10.2/css/all.css" integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC" crossorigin="anonymous">
字体真棒图标没有显示,我在浏览器的控制台中收到异常:
Failed to find a valid digest in the 'integrity' attribute for resource 'https://use.fontawesome.com/releases/v5.10.2/css/all.css' with computed SHA-256 integrity 'zmfNZmXoNweWBMcemUOo1XdsUGFfcasdasda0ihGGLYdgtJS3KCr/l0='. The resource has been blocked.
当我删除完整性属性时,字体真棒图标显示正常:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.10.2/css/all.css" crossorigin="anonymous">
我做错了什么?请建议。谢谢。
【问题讨论】:
标签: html css angular font-awesome