twitter-bootstrap Twitter Bootstrap 中的搜索框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16278158/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
A search box in Twitter Bootstrap
提问by jason
I have this search box :
我有这个搜索框:


And the code of the search box is :
搜索框的代码是:
<form method = "post" action="search.php" class = "pull-down navbar-search">
<div class="input-append">
<input class="search-query input-medium" name="search_query" type="text" placeholder="Arama Yap" >
<button type = "submit "class="btn btn-large" type="button"><i class="icon-search"></i></button>
</div>
</form>
I want the search box to have no space between the box and the button. How can I accomplish it? Thanks.
我希望搜索框在框和按钮之间没有空格。我怎样才能完成它?谢谢。
回答by Billy Moat
Scroll down on this link to the bit that says "Search Form";
向下滚动此链接到“搜索表单”位;
http://twitter.github.io/bootstrap/base-css.html#forms
http://twitter.github.io/bootstrap/base-css.html#forms
Here's a fiddle showing it working: http://jsfiddle.net/3PgU2/
这是一个显示它工作的小提琴:http: //jsfiddle.net/3PgU2/
<form class="form-search">
<div class="input-append">
<input type="text" class="span2 search-query">
<button type="submit" class="btn">Search</button>
</div>
<div class="input-prepend">
<button type="submit" class="btn">Search</button>
<input type="text" class="span2 search-query">
</div>
</form>

