我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。


当前回答

下载完整/非定制包从那里的网站和替换您的字体文件与非定制包字体。意志是固定的。

其他回答

下载完整/非定制包从那里的网站和替换您的字体文件与非定制包字体。意志是固定的。

例如,确保你没有过度指定字体族

*{font-family: Verdana;}

将从I元素中删除halflings字体。

如果有人在这里结束并使用引导>= v4.0:取消对字形的支持

发行说明中的相关部分:

删除Glyphicons图标字体。如果你需要图标,一些选项是: Glyphicons的上游版本 Octicons 字体太棒了

来源:https://v4-alpha.getbootstrap.com/migration/组件

如果你想使用象形文字,你需要单独下载。

我个人尝试过Font Awesome,它是相当好的。添加图标的方式类似于glypicon:

<i class="fas fa-chess"></i>

这是由于bootstrap.css和bootstrap.min.css中的错误编码。当你从定制器下载Bootstrap 3.0时,以下代码是缺失的:

@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');
}

因为这是使用Glyphicons的主要代码,所以它不会在ofc…

从完整的包中下载css文件,这段代码将被实现。

我在硬盘里找这些文件

glyphicons-halflings-regular.woff

glyphicons-halflings-regular.woff2

glyphicons-halflings-regular.eot

glyphicons-halflings-regular.svg

glyphicons-halflings-regular.ttf

然后在。net项目中复制它们的字体文件