简体   繁体   English

引导程序不显示几个字形

[英]Bootstrap few glyphicons are not showing

When I go to the site https://getbootstrap.com/docs/3.3/components/ I can choose from different glyphicons. 当我转到站点https://getbootstrap.com/docs/3.3/components/时,我可以从不同的字形中进行选择。

The problem is that the icons on the bottom are not working. 问题是底部的图标不起作用。 For example: 例如:

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- showing --> <span class="input-group-addon"><i class="glyphicon glyphicon-random color-blue"></i></span> <!-- not showing --> <span class="input-group-addon"><i class="glyphicon glyphicon-option-horizontal"></i></span> 

Below the bootstrap and jquery version I use in my asp.net (vb) project: 在我的asp.net(vb)项目中使用的bootstrap和jquery版本以下:
Bootstrap: 3.3.7 引导程序:3.3.7
jquery: 3.2.1 jQuery的:3.2.1

Is there a way that I can add those glyphicons? 有没有一种方法可以添加这些字形?
According to the bootstrap site those not showing icons should work for 3.3.7 根据引导站点,那些不显示图标的用户应该可以在3.3.7下工作

When you look at the bootstrap CSS, you can see that the icons are actually a icon font. 查看引导CSS时,您可以看到图标实际上是图标字体。

@font-face{
    font-family:'Glyphicons Halflings';
    src:url(../fonts/glyphicons-halflings-regular.eot);
    src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) 
    .......
}

If you want these icons to show, you have to make sure that these fonts can be found by your browser. 如果要显示这些图标,则必须确保浏览器可以找到这些字体。

Sorry it was my own fault. 对不起,这是我自己的错。

After checking, the bootstrap version file was 3.0.0. 检查后,引导程序版本文件为3.0.0。 Did an update to 3.3.7 and it is working now. 已更新至3.3.7,并且现在可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM