Bootstrap 3.2.0 Glyphicons不工作

use*_*545 3 css glyphicons twitter-bootstrap-3

我是bootstrap的新手,它的字形不适合我.之后,我已经检查代码font-familyglyphicon-user"Helvetica Neue",?Helvetica,?Arial,?sans-serif与不是Glyphicons Halflings.我错过了什么或者我需要更改css文件.

<!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>
Run Code Online (Sandbox Code Playgroud)

Cat*_*ANU 10

您需要添加该类glyphicon.

所以你的跨度应该是:

<span class="glyphicon glyphicon-user"></span>
Run Code Online (Sandbox Code Playgroud)

如文档中所示:http://getbootstrap.com/components/#glyphicons-how-to-use

  • 如果OP花了10秒钟阅读文档,他就已经知道了.+1 (3认同)