Twitter bootstrap v3 - 输入旁边的按钮未四舍五入

时间:2017-03-29 14:11:43

标签: html twitter-bootstrap twitter-bootstrap-3

我复制了这段代码(来自official documentation)并对其进行了修改:

<div class="row">
    <div class="col-xs-6 col-xs-offset-3">
        <div class="form-group">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="Email addresses">
                <span class="input-group-btn">
                    <button class="btn btn-primary" type="button">
                        <i class="fa fa-envelope-o" aria-hidden="true"></i>
                        Send
                    </button>
                </span>
            </div>
        </div>
    </div>
</div>

按钮的右侧未在源中进行舍入。结果: enter image description here

我缺少什么?

1 个答案:

答案 0 :(得分:0)

@ No1Lives4Ever你的代码工作正常。请参阅以下代码段...

&#13;
&#13;
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
    <div class="col-xs-6 col-xs-offset-3">
        <div class="form-group">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="Email addresses">
                <span class="input-group-btn">
                    <button class="btn btn-primary" type="button">
                        <i class="fa fa-envelope-o" aria-hidden="true"></i>
                        Send
                    </button>
                </span>
            </div>
        </div>
    </div>
</div>
&#13;
&#13;
&#13;