11form-horizontal.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Bootstrap grid system</title>
  5. <meta charset="utf-8"/>
  6. <meta http-equiv="X-UA-COMPATIBLE" content="IE=Edge"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <link rel="stylesheet" href="../css/bootstrap.min.css"/>
  9. <link rel="stylesheet" href="styles.css" />
  10. <!--[if lt IE 9]>
  11. <script src="../js/html5shiv.3-7-0.js"></script>
  12. <script src="../js/respond.1-4-2.min.js"></script>
  13. <![endif]-->
  14. </head>
  15. <body>
  16. <div class="container">
  17. <div class="page-header">
  18. <h1>Chapter 3
  19. <small>Exploring Bootstrap components: horizontal form</small>
  20. </h1>
  21. </div>
  22. <form class="form-horizontal">
  23. <div class="form-group has-success">
  24. <label for="nameField" class="col-xs-2">Name</label>
  25. <div class="col-xs-10">
  26. <input type="text" class="form-control input-lg" id="nameField" placeholder="Your name" />
  27. </div>
  28. </div>
  29. <div class="form-group has-warning">
  30. <label for="emailField" class="col-xs-2">E-mail</label>
  31. <div class="col-xs-10">
  32. <input type="text" class="form-control" id="emailField" placeholder="Your email" />
  33. <span class="help-block">Accepts email addresses in the form foo@bar.tld only</span>
  34. </div>
  35. </div>
  36. <div class="form-group has-error">
  37. <label for="phoneField" class="col-xs-2">Phone number</label>
  38. <div class="col-xs-10">
  39. <input type="text" class="form-control" id="phoneField" placeholder="Your phone number" />
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label for="descField" class="col-xs-2">Description</label>
  44. <div class="col-xs-10">
  45. <textarea class="form-control input-sm" id="descField" placeholder="Your comments"></textarea>
  46. </div>
  47. </div>
  48. <div class="col-xs-10 col-xs-offset-2">
  49. <button type="submit" class="btn btn-primary">Submit</button>
  50. <button type="reset" class="btn btn-default">Reset</button>
  51. </div>
  52. </form>
  53. </div>
  54. <!-- https://ajax.googleapis.com/ajax/libs/jquery/1.11.1.jquery.min.js -->
  55. <script src="../js/jquery-1.11.2.min.js"></script>
  56. <script src="../js/bootstrap.js"></script>
  57. </body>
  58. </html>