為什么我的水平表單顯示的不是水平的,input的寬度不是100%,說明不是基礎(chǔ)表單了,就是不水平
<!doctype html>
<html>
<head>
? ? <meta charset="UTF-8">
<title>水平表單</title>
<link rel="stylesheet" >
</head>
<body>
<form role="form">
? <div>
? ? <label for="inputEmail3" class="col-sm-2 control-label">郵箱</label>
? ? <div>
? ? ? <input type="email" id="inputEmail3" placeholder="請(qǐng)輸入您的郵箱地址">
? ? </div>
? </div>
? <div>
? ? <label for="inputPassword3" class="col-sm-2 control-label">密碼</label>
? ? <div>
? ? ? <input type="password" id="inputPassword3" placeholder="請(qǐng)輸入您的郵箱密碼">
? ? </div>
? </div>
? <div>
? ? <div class="col-sm-offset-2 col-sm-10">
? ? ? <div>
? ? ? ? <label>
? ? ? ? ? <input type="checkbox"> 記住密碼
? ? ? ? </label>
? ? ? </div>
? ? </div>
? </div>
? <div>
? ? <div class="col-sm-offset-2 col-sm-10">
? ? ? <button type="submit" class="btn btn-default">進(jìn)入郵箱</button>
? ? </div>
? </div>
</form>
</body>
</html>
2018-06-02
還要把Bootstrap4換成Bootstrap3
2017-12-25
Bootstrap 提供了下列類型的表單布局:
垂直表單(默認(rèn)) ? ? ?內(nèi)聯(lián)表單 ? ?水平表單
要記得分組例如
?<div class="form-group"> ? ?<label for="name">名稱</label> ? ?<input type="text" class="form-control" id="name" placeholder="請(qǐng)輸入名稱"> ?</div>
詳細(xì)的可以參考
http://www.runoob.com/bootstrap/bootstrap-forms.html