<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body>
<form role="form" class="form-inline"><!--表單變成內聯,寬度自適應-->
<div class="form-group">
<label>密碼</label>
<input type="password" name="" class="form-control" placeholder="Enter password">
</div>
<div class="form-group">
<label>email</label>
<input type="email" name="" class="form-control" placeholder="Enter email">
<button type="submmit">提交</button>css
</div>
<div class="form-group">
<label class="sr-only">選擇文件</label> <!--lable添加class sr-only 能夠隱藏lable-->
<input type="file" name="">
<p class="help-block">選擇你須要的文件</p>
</div>html
</form>
<form role="form" class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" name="" class="form-control" placeholder="email"><!--加類form-control帶圓角效果-->
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">password</label>
<div class="col-sm-10">
<input type="password" name="" placeholder="password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2"><!--添加類名col-md-offset-2向右移動兩個位子-->
<div class="checkbox">
<label>bootstrap
<input type="checkbox" name="">記住密碼
</label>orm
</div>htm
</div>input
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submmit" class="btn btn-default">登陸</button>it
</div>form
</div>
</form>
</body>
</html>class