下面是使用最新的引導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