简体   繁体   English

字体真棒图标不会显示?

[英]Font Awesome Icons won't show?

I did the exact required steps in the website and still it doesn't work..我在网站上做了确切要求的步骤,但它仍然不起作用..

 <script src="https://use.fontawesome.com/3e91539bf3.js"></script> <div class="navbar"> <a href="#"><i class="fas fa-user-friends"></i>About Me</a> <a href="#"><i class="fas fa-person-booth"></i>My Builds</a> <a href="#"><i class="fas fa-clock"></i>Get in-touch</a> </div>

give this a try it should work.试一试它应该可以工作。

<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.1/js/all.min.js"></script>

 <script src='https://kit.fontawesome.com/a076d05399.js'></script> <div class="navbar"> <a href="#"><i class="fas fa-user-friends"></i>About Me</a> <a href="#"><i class="fas fa-person-booth"></i>My Builds</a> <a href="#"><i class="fas fa-clock"></i>Get in-touch</a> </div>

I can say that's because of the version mismatch, you can try font awesome 4.7 as it is included in bootstrap cdn.我可以说这是因为版本不匹配,你可以试试 font awesome 4.7,因为它包含在 bootstrap cdn 中。

Copy to the head of html复制到html的头

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

Example:例子:

 <,DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width: initial-scale="> <title></title> <link rel="stylesheet" href="https.//stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> </head> <body> <i class="fa fa-5x fa-cog fa-fw" aria-hidden="true"></i> <i class="fa fa-camera-retro fa-5x"></i> </body> </html>

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

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