当前第2页 返回上一页
下面的Contents的七个内容就是它能实现的几个基本功能,这里我们关注第四个button addons就可以了,其它的如果有兴趣可以自行学习。
1 2 3 4 5 6 | Button addons
Buttons in input groups are a bit different and require one extra level of nesting. Instead of .
input-group-addon,
you’ll need to use .input-group-btn to wrap the buttons. This is required due to default browser
styles that cannot
be overridden.
|
上面一段话就是指,在input groups里面的button和普通的不一样,它需要一个不一样的嵌套层次。其实简单来说,就是我们不再使用input-group-addon,而使用input-group-btn来管理按钮,我给出的demo代码如下所示:
1 2 3 4 5 6 7 | <div class = "input-group col-md-3" style= "margin-top:0px positon:relative" >
<input type= "text" class = "form-control" placeholder= "请输入字段名" / >
<span class = "input-group-btn" >
<button class = "btn btn-info btn-search" >查找</button>
<button class = "btn btn-info btn-search" style= "margin-left:3px" >添加</button>
</span>
</div>
|
最后出现的效果如下所示

这样就很完美的显示出了搜索栏的选项,且风格保持了一致。
相关文章推荐:
1.Bootstrap Table 搜索框和查询功能详解
2.bootStrap-table服务器端后台分页及自定义搜索框的实现的使用
相关视频推荐:
1.独孤九贱(7)_Bootstrap视频教程
以上就是bootstrap中搜索框怎么做的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
bootstrap中搜索框怎么做
更多相关阅读请进入《bootstrap中搜索框怎么做》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » bootstrap中搜索框怎么做