2015-10-14 113 views
1

是否可以在不向web.config添加此代碼的情況下讓引導程序圖形工作?404 Not Found Glyphicons Bootstrap解決方法

<system.webServer> 
    <staticContent> 
     <remove fileExtension=".woff" /> 
     <remove fileExtension=".woff2" /> 
     <mimeMap fileExtension=".woff" mimeType="application/font-woff" /> 
     <mimeMap fileExtension=".woff2" mimeType="application/font-woff" /> 
    </staticContent> 
    </system.webServer> 

不幸的是,我不能在我的工作場所添加這個,但仍然希望從bootstrap中使用分頁。有沒有其他解決方法?這些是我收到的錯誤。 enter image description here

也許以某種方式直接下載圖像並更改引導CSS以找到正確的?我需要的只是此刻的分頁。有任何想法嗎?

+0

這個問題可能會讓你感興趣:http://stackoverflow.com/questions/33133497/bootstrap-about-fonts-files-roles-and-usages –

回答

1

即使找不到glyphicons-halflings-regular.woff2或glyphicons-halflings-regular.woff,您也應該能夠使用引導分頁。

默認情況下,Bootstrap的圖標是glyphicons-halflings-regular.ttf。瀏覽器將使用它將找到的第一個兼容字體文件,並且ttf得到很好的支持。

欲瞭解更多信息:Why should we include ttf, eot, woff, svg,... in a font-face

也許事情是錯在你的HTML。

2

你也許能夠:

  • 使用引導程序託管在CDN
  • 構建或修改引導並刪除WOFF字體
  • 二者的結合中,修改自己的引導使用WOFF來自CDN的文件
  • 重寫Bootstrap的圖形部分以使用圖像(可能是最糟糕的想法,但它會起作用)。
相關問題