html页面icon字体无法显示,bootstrap中icon字体图标怎么不显示?
bootstrap中icon字體圖標(biāo)怎么不顯示?下面本篇文章給大家介紹一下Bootstrap字體圖標(biāo)不顯示問題。有一定的參考價(jià)值,有需要的朋友可以參考一下,希望對(duì)大家有所幫助。
問題:
bootstrap使用字體圖標(biāo)時(shí)只顯示一個(gè)框,不顯示圖標(biāo)。
問題分析:
出現(xiàn)的原因是:bootstrap.css文件沒有正確關(guān)聯(lián)上字體文件glyphicons-halflings-regular.eot。
查看bootstrap.css源碼可知:@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.woff2') format('woff2'), 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');
}
注意當(dāng)中的url
解決辦法:
把從網(wǎng)上下載的整個(gè)bootstrap丟到eclipse中。如圖
在jsp頁面中的引用:
bootStrap表單注意:jQuery的引用要放在bootstrap引用前,否則會(huì)報(bào)Uncaught Error: Bootstrap's JavaScript requires jQuery的錯(cuò)誤
更多web前端課程相關(guān)知識(shí),請(qǐng)查閱 HTML中文網(wǎng) !!
總結(jié)
以上是生活随笔為你收集整理的html页面icon字体无法显示,bootstrap中icon字体图标怎么不显示?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 金卡信用卡最高额度
- 下一篇: h5比html新增加的标签,HTML5(