bootstrap glyphicons不工作? [英] bootstrap glyphicons not working?
本文介绍了bootstrap glyphicons不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
bootstrap glyphicons不工作???只显示一个方框
我的代码为
< div class = col-sm-4 > ;
< span class = glyphicon glyphicon-globe logo > < / span >
< / div >
PLZ帮帮我
thnx
解决方案
你有没有在你的CSS中导入glyphicons字体文件?如果还没有,请执行此操作 -
@ font-face {
font-family : 'Glyphicons Halflings';
src : url('../ fonts /glyphicons-halflings-regular.eot');
src : < span class =code-keyword> url('../ fonts / glyphicons-halflings-regular.eot?#iefix')format('embedded-opentype'),url('../ fonts / glyphicons-halflings- regular.woff')格式('woff'),url('../ fonts / glyphicons-halflings-regular.ttf')格式('truetype'),url('../ fonts / glyphicons-halflings-regular。 svg#glyphicons-halflingsregular')format('svg');
}
根据您的目录结构更改路径。
-KR
你必须在您的代码中添加以下链接:
< link rel =stylesheethref =https://maxcdn.bootstrapcdn。 COM /引导/ 3.4.0 / CSS / bootstrap.min.css>
查看示例请参考以下链接:
example
bootstrap glyphicons not working??? only a square box is being displaying
my code is as
<div class="col-sm-4">
<span class="glyphicon glyphicon-globe logo"></span>
</div>
plz help me
thnx
解决方案
Have you imported the glyphicons font file in your css ? If you haven't, do this-
@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'); }
Change the path according to your directory structure.
-KR
you have to add below link in your code:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
to see example kindly refer below link:
example
这篇关于bootstrap glyphicons不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文