我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。
当前回答
我在硬盘里找这些文件
glyphicons-halflings-regular.woff
glyphicons-halflings-regular.woff2
glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
然后在。net项目中复制它们的字体文件
其他回答
我也有同样的问题,除了在本页的隐藏评论中,我找不到任何关于它的信息。根据Chrome浏览器,我的字体文件加载正常,但图标显示不正常。我把这个作为答案,希望能帮助到其他人。
我从Bootstrap 3的定制工具下载的字体文件有问题。要获得正确的字体,请访问Bootstrap主页并下载完整的.zip文件。从那里提取四个字体文件到你的字体目录,一切都应该工作。
您的字体目录中是否有以下所有文件
glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff
您必须按以下顺序设置:
<link rel="stylesheet" href="path/bootstrap.min.css">
<style type="text/css">
@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'); }
</style>
我修改了较少的变量。更少的文件 我修改了变量
@icon-font-path: "fonts/";
最初的是
@icon-font-path: "../fonts/";
这造成了一个问题
如果你使用Visual Studio(2015年,在我的情况下)来创建一个ASP。NET Webforms Web Application,带有Bootstrap主题,默认情况下,字形存储在项目根目录下的/fonts文件夹中。
如果您开始将/Content下的引导文件重新安排到子文件夹中(例如,支持多个主题),那么引导中的所有引用都将引导到../fonts/将中断。您可以将字体文件夹移动到/Content下适当的相对路径,或者重命名从../fonts到/fonts。