火狐開啟本地bootstrap頁面,小圖示無法正常顯示問題
阿新 • • 發佈:2019-02-04
場景是,我下了一套bootstrap的頁面,當本地用ff開啟某一個html的時候,發現頁面上的小圖片無法正常顯示,一開始我一直以為是bootstrap的字型樣式問題,後發現同一個頁面,在chrome裡卻能正常顯示,後來到處查詢一番,終於發現,是ff的設定問題,只要改一下預設設定即可。
原文連結:http://stackoverflow.com/questions/19085942/boootstrap-glyphicons-firefox-issues
解決方案如下:
Firefox has a strict setting(this) that prevents your HTML file from accessing your web fonts from folders not on the root. This only happens when you work locally and not from files on a server. You have to change a setting in Firefox to display the glyphicons when you develop locally.
-open "about:config" in your address in firefox
原文連結:http://stackoverflow.com/questions/19085942/boootstrap-glyphicons-firefox-issues
解決方案如下:
Firefox has a strict setting(this) that prevents your HTML file from accessing your web fonts from folders not on the root. This only happens when you work locally and not from files on a server. You have to change a setting in Firefox to display the glyphicons when you develop locally.
-open "about:config" in your address in firefox
-Then search for "security.fileuri.strict_origin_policy" property and change it from "true" to "false". (ignore quotation marks of course)
如果出現:Content Security Policy: 頁面設定阻止讀取xxxxx
則需要在about:config中,設定security.csp.enable為false,然後重新重新整理瀏覽器