<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE-edge"> <meta content="width=device-width,initial-scale=1"> <title>Bootstrap 101 Template</title> <link href="https://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap-theme.min.css"> <link href="https://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap.min.css"> <!-- <style> div{ width:100px; height:100px; margin-top:10px; background:pink; } span{ width:100px; height:100px; margin-top:10px; background:yellow; } </style> --> </head> <body> <!-- 内联表单 横向排列--> <form role="form"> <div> <label for="exampleInputEmail2">Email address</label> <input type="email" placeholder="Email"> </div> </form> <br/> <!-- 水平表单,分配格数,总共12格 纵向排列--> <form role="form"> <div> <label for="exampleInputEmail">Email address</label> <div> <input type="email" placeholder="Email"> </div> </div> <div> <label for="exampleInputEmail3">Password</label> <div> <input type="password" placeholder="Password"> </div> </div> <div> <div> <div> <label><input type="checkbox">Remember me</label> </div> </div> </div> <div> <div> <button type="submit">Sign in</button> </div> </div> </form> <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.1/js/npm.js"></script> </body> </html>
效果图: