我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。
当前回答
例如,如果您希望图标为glyphicon-chevron-left
尝试添加class="glyphicon glyphicon-chevron-left"
其他回答
我正在使用Angular2和SCSS,作为一个最佳实践,我复制到我的项目中,只有我正在修改的引导文件从node_modules导入。唯一的问题是glyphicon。 经过多次尝试,我发现对我来说最好的解决方案是复制字体文件到我的项目,并直接设置此路径为$ icon-font-path,如图所示:
下载完整/非定制包从那里的网站和替换您的字体文件与非定制包字体。意志是固定的。
如果你使用Visual Studio(2015年,在我的情况下)来创建一个ASP。NET Webforms Web Application,带有Bootstrap主题,默认情况下,字形存储在项目根目录下的/fonts文件夹中。
如果您开始将/Content下的引导文件重新安排到子文件夹中(例如,支持多个主题),那么引导中的所有引用都将引导到../fonts/将中断。您可以将字体文件夹移动到/Content下适当的相对路径,或者重命名从../fonts到/fonts。
例如,如果您希望图标为glyphicon-chevron-left
尝试添加class="glyphicon glyphicon-chevron-left"
这是由于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文件,这段代码将被实现。