0
我已經複製並粘貼來自bootstrap的示例代碼。我已經包含引導CSS和JS文件& jQuery庫。 Base CSS - BootstrapBootstrap標籤和輸入字段不顯示水平
由於某些原因,標籤和輸入字段顯示爲內聯。有人可以看看我做錯了什麼嗎?
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputEmail">Email</label>
<div class="controls">
<input type="text" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label>
<div class="controls">
<input type="password" id="inputPassword" placeholder="Password">
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox"> Remember me
</label>
<button type="submit" class="btn">Sign in</button>
</div>
</div>
</form>
你的'form'標籤看起來不錯,我相信你忘了添加容器''div' class&'<!DOCTYPE html>'HTML5 –
把你的代碼放在jsfiddle上。 –
您標記了Bootstrap 3的問題,但您鏈接到Bootstrap 2文檔,並且您擁有的代碼也是Bootstrap 2.如果您將上面的代碼掛鉤到Bootstrap 3 CSS,它將不起作用。 –