2016-03-07 27 views
0

我已在我的項目"bootstrap-sass": "~3.3.6"中通過Bower安裝。在我index.html我有autoamticaly注入這樣的:Bootstap-sass 3.3.6 + Bower = no glyphicon

<script src="bower_components/bootstrap-sass/assets/javascripts/bootstrap.js"></script> 

,並在我的style.scss我把這個:

@import '../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap'; 

缺少什麼我得到glyphicons工作?

回答

0

glyphicons是一個字體,而不是顯示字符的顯示矢量圖像

所以爲了顯示你所需要的圖標,添加SASS旁,確保在dist文件夾中的字體是相對路徑從而使CSS @font-face將正確加載

您可以檢查由開放網絡(鉻)的路徑,你應該看到的404錯誤的字體路徑

+0

我沒有404,所以我想,我需要在我的scss中寫下@ font-face指令,對吧? – Nemus

+0

我在github中查看[bootstap-sass](https://github.com/twbs/bootstrap-sass),看到@import文件的名稱是「@import」../../bower_components/ bootstrap-sass/assets/stylesheets/_bootstrap''在開始時帶有下劃線 – Zamboney