【发布时间】:2014-04-30 06:03:55
【问题描述】:
您好,我很想使用引导程序字形图标,但它们不起作用。我正在尝试加载 glyphicon-ok、glyphicon-remove 和 glyphicon-star。但问题是这些图标会加载。 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>
【问题讨论】:
-
尝试将 bootstrap.css 放在列表的最后,看看你的其他 CSS 文件是否在干扰它。
-
那行不通。我把 bootstrap.css 放在我所有的 css 文件下面,甚至我的 js 链接下面。
-
我将您的代码发布到 my 模板中,它显然运行良好。尝试引用 Bootstrap CDN 而不是本地文件。
-
我不明白我尝试了您发布的链接并且它有效,所以我想也许我弄乱了 bootstrap.css 文件并重新下载了它。但是当我使用新下载的 bootstrap.css 文件时它仍然不起作用。我什至使用了 bootstrap.min.css,但以太不起作用。
-
你也试过fresh
bootstrap.min.js吗?我的建议是从 CDN 链接同时下载css和js。
标签: twitter-bootstrap glyphicons