本文介绍了Bootstrap 3.2.0 Glyphicons无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Bootstrap&的新手.它的字形对我不起作用.我检查了代码后, glyphicon-user
的 font-family
是"Helvetica Neue",Helvetica,Arial,sans-serif 代码>&不是
Glyphicons Halflings
.我是否缺少某些东西,还是需要更改 css
文件.
I'm new to bootstrap & its glyphicons are not working for me. After I've inspect the code, font-family
of glyphicon-user
was "Helvetica Neue",Helvetica,Arial,sans-serif
& not Glyphicons Halflings
. Am I missing something or do i need to change the css
file.
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/bootstrap-theme.min.css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
<form>
<div class="row">
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">
<span class="glyphicon-user"></span>
</span>
<input type="text" class="form-control" placeholder="Username"/>
</div>
</div>
<div class="col-xs-4">
<div class="input-group">
<input type="text" class="form-control" placeholder="Amount">
<span class="input-group-addon">.00</span>
</div>
</div>
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">$</span>
<input type="text" class="form-control" placeholder="US Dollar">
<span class="input-group-addon">.00</span>
</div>
</div>
</div>
</form>
</body>
</html>
推荐答案
您需要添加类 glyphicon
.
所以您的跨度实际上应该是:
So your span should actually be:
<span class="glyphicon glyphicon-user"></span>
如文档中所示: http://getbootstrap.com/components/#glyphicons-how-to-使用
这篇关于Bootstrap 3.2.0 Glyphicons无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!