Bootstrap输入组插件不是同一个高度

时间:2015-11-02 07:07:16

标签: javascript html twitter-bootstrap

我使用输入组插件创建了一个timpicker。

<div class="input-group bootstrap-timepicker timepicker">
                        <input id="timepickermailingtoupsummary" type="text"
                            style=" position: relative;"> <span
                            class="input-group-addon"><i
                            class="glyphicon glyphicon-time"></i></span>
                    </div>

但它返回

enter image description here

你能得到同样的身高吗?

3 个答案:

答案 0 :(得分:0)

您只是忘记了将类form-control引导到输入字段。只需将该类添加为:

<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>

<div class="input-group bootstrap-timepicker timepicker">
    <input id="timepickermailingtoupsummary" type="text"  class="form-control" style=" position: relative;" /> 
    <span class="input-group-addon">
        <i class="glyphicon glyphicon-time"></i>
    </span>
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<强> JSfiddle Demo

答案 1 :(得分:0)

您需要将类auto a = A(3);添加到输入中:

A a(3);

还有3个班级大小。

&#13;
&#13;
form-control
&#13;
<input id="timepickermailingtoupsummary" type="text" class="form-control">
&#13;
&#13;
&#13;

答案 2 :(得分:0)

这会对你有帮助..

演示:http://jsfiddle.net/qW2wL/142/

    <div class="input-append bootstrap-timepicker-component">
 <input type="text" class="timepicker-value input-small" value="12:42 PM">
 <span class="add-on">
    <i class="icon-time"></i>
 </span>
 </div>