3

由于某种原因,当我使用 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>
4

1 回答 1

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-widthglyphicon-adjus有关(adjus 可能拼写错误?)

于 2013-08-24T16:52:25.660 回答