Font awesome not displaying properly on Firefox

前端 未结 8 1869
挽巷
挽巷 2021-02-19 20:47

I am trying to use a font awesome icon in a widget that is installed on a customers website. The font awesome icons displays correctly in Safari and Chrome but doesnt in Firefo

8条回答
  •  耶瑟儿~
    2021-02-19 21:04

    I notice a strange behaviour, probably related to the firefox security policies. I had the same problems with a project configuration like so:

    • /site/html <--- where all the .html files go
    • /site/resources/... <--- where all the css, font, img, js stuff goes

    now, I included the font-awesome.min.css in an html file located under the /site/html directory and I experimented your problem. But when you download the Font Awesome package it is shipped with html demo files that actually works in firefox. What's the trick?!

    Their project structure has the "resources" folder (they call it "assets") nested inside the "html" folder. This seems to calm down the firefox security policy. Finally, my answer is: get a configuration like the following

    • /site/html <--- where all the .html files go
    • /site/html/resources/... <--- where all the css, font, img, js stuff goes

    it worked for me.

提交回复
热议问题