由于某些原因,当我使用twitter bootstrap 2.3.2时,图标没有加载图像。我有默认结构 CSS / IMG / JS /
其他一切正常,我也尝试添加一个简单的图标,如<span class="icon icon-ok">OK</span>
,也可以使用
有人能看到什么错误吗?
<!DOCTYPE HTML>
<html>
<head>
<title>Fixed layout example with Twitter Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="resources/css/bootstrap.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container">
<form class="form-horizontal">
<fieldset>
<legend>Create a new question</legend>
<div class="control-group">
<label class="control-label" for="questionTitle">Title</label>
<div class="controls">
<input type="text" class="input-xlarge" id="questionTitle">
</div>
</div>
<div class="control-group">
<label class="control-label" for="questionText">Question</label>
<div class="controls">
<textarea class="input-xlarge" id="questionText" rows="4"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="questionTypes">What type of answer are your looking for?</label>
<button type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-align-justify"></span> Multiple choice
</button>
<button type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-adjus"></span> Yes/No
</button>
<button type="button" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-text-width"></span> Text input
</button>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save changes</button>
<button class="btn">Cancel</button>
</div>
</fieldset>
</form>
</div>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="resources/js/bootstrap.js"></script>
</body>
</html>
答案 0 :(得分:4)
尝试使用以下标记:
<i class="icon-star icon-white"></i>
来源:http://getbootstrap.com/2.3.2/base-css.html#icons
编辑:看起来你可能正在使用v3.0.0 - 你是否尝试使用没有添加额外课程的字形编辑?只是标准类:
<span class="glyphicon glyphicon-star"></span>
如果加载,那么它可能与glyphicon-text-width
和glyphicon-adjus
有关(可能是拼写错误?)