Bootstrap 加载错误的字形 [英] Bootstrap loading wrong glyphicon
问题描述
您好,我很想使用引导程序字形,但它们不起作用.我正在尝试加载 glyphicon-ok、glyphicon-remove 和 glyphicon-star.但问题是这些图标会加载.http://imagebin.org/301047
Hello I am tyring to use bootstraps glyphicons but they are not working. Im trying to load glyphicon-ok, glyphicon-remove, and glyphicon-star. but the problem is that these icons load instead. http://imagebin.org/301047
这是我的头部分
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css">
<link href="css/styles.css" rel="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
这是我的字形
<li>
<a href="#">
<span class="glyphicon glyphicon-ok"></span>
</a>
</li>
<li>
<a href="#">
<span class="glyphicon glyphicon-remove"></span>
</a>
</li>
<li>
<a href="#">
<span class="glyphicon glyphicon-star"></span>
</a>
</li>
推荐答案
我也面临着同样的问题,唯一对我有用的是项目文件夹层次结构的变化.为了更好地理解,下面提到的是我项目的两个文件夹层次结构:
I was also facing the same issue and the only thing that worked for me is the change in hierarchy of my project's folders. For better understanding, below mentioned are both of my project's folders hierarchies:
**Earlier(problematic):**
-Public
--CSS
---Bootstrap
----bootstrap.min.css
----bootstrap.css
--Fonts
--Images
--JS
**Latest (Solution)**
-Public
--CSS
---Bootstrap
----bootstrap.min.css
----bootstrap.css
---Fonts
--Images
--JS
总之,必须将 'Fonts' 文件夹放在 'Bootstrap' 文件夹之外!
In short must place the 'Fonts' folder besides 'Bootstrap' folder!
这篇关于Bootstrap 加载错误的字形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!