下面是使用最新的引导V3引导中心组输入搜索字段
/*here is the specialjum class in css*/
.specialjum {
background: #1F72B8;
background-size: cover;
min-height: 600px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/css/bootstrap-theme.min.css" rel="stylesheet" />
<div class="jumbotron specialjum">
<div class="row">
<h6 class="text-center" style="position: relative; left: -200px;"><img src="~/Images/logo.png" /></h6>
</div>
<div class="col-lg-6 col-lg-offset-4">
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-secondary" type="button">Go!</button>
</span>
<input type="text" class="form-control" placeholder="Search for...">
</div>
</div>
</div>
没有其他引导已被修改,我的代码。 现在,当我使用上面的代码,按钮被固定到输入字段按预期方式和输入组获取中心在jumbotron div标记 但是,如果我在输入文本 后更换跨度按钮该按钮是关闭正确的。
此处为达
以下代码.specialjum {
background: #1F72B8;
background-size: cover;
min-height: 600px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/css/bootstrap-theme.min.css" rel="stylesheet" />
<div class="jumbotron specialjum">
<div class="row">
<h6 class="text-center" style="position: relative; left: -200px;"><img src="~/Images/logo.png" /></h6>
</div>
<div class="col-lg-6 col-lg-offset-4">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-secondary" type="button">Go!</button>
</span>
</div>
</div>
</div>
通知唯一的区别是,其中按钮位于前或输入标记之后。
注:自举V3 - 不做任何修改
请帮忙谢谢=)
综观[引导文件](http://v4-alpha.getbootstrap.com/components/input-group/#button-addons),这不就是对预期的方式该按钮的行为? – boyomarinov
我正在查看你的代码,并用它构建了一个codepen,我发现你的代码绝对没有错。你能用涂料展示你的预期结果来涂鸦图像吗? – LOTUSMS
好的,我现在看到。您的输入组向右移动。 – LOTUSMS