補充:
其實不須要下面這麼麻煩,只須要建一個fonts文件夾放在和js,css文件同級目錄下,就能夠正確引用,關鍵是下面這幾個文件得有:css
第一種(字體文件的路徑請靈活改變)
<style type="text/css"> @font-face { font-family: 'Glyphicons Halflings'; src: url('font/glyphicons-halflings-regular.eot'); src: url('font/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('font/glyphicons-halflings-regular.woff') format('woff'), url('font/glyphicons-halflings-regular.ttf') format('truetype'), url('fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); }
第二種
<!--<style type="text/css"> @font-face { font-family: 'Glyphicons Halflings'; src: url('font/glyphicons-halflings-regular.eot'); src: url('font/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('font/glyphicons-halflings-regular.woff') format('woff'), url('font/glyphicons-halflings-regular.ttf') format('truetype'), url('font/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); }
注意:用font-size屬性調整字體圖標的大小,且不會失真。svg