首页 > Bootstrap3 为何无法显示Glyphicons 图标

Bootstrap3 为何无法显示Glyphicons 图标

<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="" data-original-title="Font"><i class="glyphicon glyphicon-font"></i><b class="caret"></b></a>

本来应该显示图标”A“的,但没有显示 项目使用ASP.NET MVC4 ,bootstrap3是通过NuGet加载进来的


@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc2/css/bootstrap-glyphicons.css");

最后我通过在css中插入glyphicon的css解决问题了。


例如你想显示一个save的图标你要这么写、
<h1 class="btn btn-success btn-lg"><i class="glyphicon glyphicon-adjust">保存</i></h1>

<i>标签中的class必须要先写glyphicon这个class,然后再写glyphicon-adjust这样glyphicon-adjust才会正常显示出来、


这个问题我遇到过,是字体文件有问题。 更换了一下就好了。


bootstrap.css内有引入字体文件的,具体你去看一看,看引入的路径是否正确了


看一下调试器是不是有字体文件404或403了

【热门文章】
【热门文章】