Bootstrap   发布时间:2022-04-18  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了twitter-bootstrap-3 – Typeahead js打破bootstrap内联形式大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有这样的形式:

<form role="form" class="form-inline" name="frmUserData" id="frmUserData">
    <div class="form-group">
        <label for="txtlitm">Item Code:</label>
        <input type="text" class="form-control" id="txtlitm" name="txtlitm" autocomplete="off">
    </div>
    <div class="form-group">
        <label for="txtmcu">Branch Plant (filter):</label>
        <input type="text" class="form-control" id="txtmcu" name="txtmcu">
    </div>
    <div class="form-group">
        <label for="txtlocn">LOCATIOn (filter):</label>
        <input type="text" class="form-control" id="txtlocn" name='txtlocn'>
    </div>
    <div class="form-group">
        <button type="button" class="pull-left btn btn-default" id="btnGO">
            Search
        </button>
    </div>
</form>

在我启用typeahead.js之后看起来像这样

PIC LINK

项目代码标签未与文本框对齐,与其他字段对齐.

该怎么办才能解决这个问题?

解决方法

Typeahead.js将“vertical-align:top”设置为输入元素,这会导致您的问题(请参阅typeahead.bundle.js中的第753行和第758行)

您可以在JS中更改它或通过CSS覆盖它:

.form-inline .form-control {
    vertical-align: middle !important;
}

大佬总结

以上是大佬教程为你收集整理的twitter-bootstrap-3 – Typeahead js打破bootstrap内联形式全部内容,希望文章能够帮你解决twitter-bootstrap-3 – Typeahead js打破bootstrap内联形式所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。