最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What is the role of all.js and other JS file in font awesome package? - Stack Overflow

programmeradmin1浏览0评论

I have downloaded the font awesome package version 5.7.2 but without using the js files (inside js folder), I haven't confronted any problem and fonts working well. Here there is a help about js files but only wrote this:

SVG with JavaScript

But I don't understand what's the meaning.

So what is the role of this js files and are necessary to add in our project?

I have downloaded the font awesome package version 5.7.2 but without using the js files (inside js folder), I haven't confronted any problem and fonts working well. Here there is a help about js files but only wrote this:

SVG with JavaScript

But I don't understand what's the meaning.

So what is the role of this js files and are necessary to add in our project?

Share Improve this question edited Mar 3, 2019 at 8:54 Benjamin Shakeri asked Mar 3, 2019 at 8:40 Benjamin ShakeriBenjamin Shakeri 3154 silver badges14 bronze badges 1
  • It's not necessary to add the js files to your project. The fontawesome website mentions this: Fewer patibility concerns because Font Awesome doesn't require JavaScript. – Bob Commented Mar 3, 2019 at 9:02
Add a ment  | 

1 Answer 1

Reset to default 10

All.js must be referenced if you want to render svg icons instead of webfont icons, since the svg icons are rendered using javascript. If you go with webfont icons, simply reference All.css and skip the js files.

If you need information to base your decision on, you can read up on the subject here: Icon Fonts vs SVGs

发布评论

评论列表(0)

  1. 暂无评论