我以前使用的是下載bootstrap.min.css
文件版本,我已經加入如果我使用MaxCDN中的bootstrap.min.css文件而不是下載的引導程序文件,如何加載我的字體集中的新自定義圖標?
.glyphicon-location2:before{content:"\e948"}
在線
該文件(這是包含在一個網站模板的自定義編輯)。我已經使用icomoon更新了我的glyphicon字體集,並且在我的項目文件中引用了下載的字體集。現在,我想使用CDN版本bootstrap.min.css
加快我的頁面加載速度,但似乎只引用了默認的圖標,因爲我的自定義圖標在網頁輸出中不存在。
- 預加載的CDN版本「應該」導致多快的速度增加?
- 我在哪裏可以從我的自定義本地文件字形集中提取圖標的圖形引用?是否必須覆蓋默認字體源並指向本地字體集,類似於此線程中的答案(請記住,我沒有使用SCSS或節點)?
我可以通過添加
@font-face { font-family:'Glyphicons Halflings'; src:url('fonts/glyphicons-halflings-regular.eot'); src:url('fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('fonts/glyphicons-halflings-regular.woff') format('woff'), url('fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg') }
我style.css
文件覆蓋默認glyphicons,還是我必須重寫bootstrap.min.css
字體處理其他地方?
[Bootstrap 3 Glyphicons CDN]的可能重複(http://stackoverflow.com/questions/18222849/bootstrap-3-glyphicons-cdn) – kaz