简体   繁体   English

Bootstrap-sass 3.3.6 + Bower =没有glyphicon

[英]Bootstrap-sass 3.3.6 + Bower = no glyphicon

I've installed in my project "bootstrap-sass": "~3.3.6" through Bower. 我已经通过Bower在项目"bootstrap-sass": "~3.3.6"安装了"bootstrap-sass": "~3.3.6" In my index.html I've got injected autoamticaly this: 在我的index.html我被自动注入:

<script src="bower_components/bootstrap-sass/assets/javascripts/bootstrap.js"></script>

and in my style.scss I put this: 在我的style.scss我这样:

@import '../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap';

What am I missing to get glyphicons working? 使字形图标正常工作我缺少什么?

glyphicons is a fonts that instead of showing chars its shows vector images glyphicons是一种字体,它不显示字符而是显示矢量图像

so in order to show the icon you need, beside adding the sass, make sure that the font on the dist folder is in the relative path so that the css @font-face will load properly 因此,为了显示所需的图标,除了添加sass之外,请确保dist文件夹中的字体在相对路径中,以便css @font-face可以正确加载

you can check the path by open the network (in chrome) and you should see an error of 404 for the font path 您可以通过打开网络(Chrome浏览器)检查路径,并且字体路径应显示404错误

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

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