body { padding-top: 40px; padding-bottom: 40px; background-color: #eee; } .form-signin { max-width: 330px; padding: 15px; margin: 0 auto; } .form-signin .form-signin-heading, .form-signin .checkbox { margin-bottom: 10px; } .form-signin .checkbox { font-weight: normal; } .form-signin .form-control { position: relative; height: auto; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 10px; font-size: 16px; } .form-signin .form-control:focus { z-index: 2; } .form-signin input[type="email"] { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .form-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; }
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>サインイン</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- このテンプレートのカスタムスタイル--> <link href="css/signin.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.3/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <form class="form-signin"> <h2 class="form-signin-heading">サインインをどうぞ</h2> <label for="inputEmail" class="sr-only">Emailアドレス</label> <input type="email" id="inputEmail" class="form-control" placeholder="Emailアドレス" required autofocus> <label for="inputPassword" class="sr-only">パスワード</label> <input type="password" id="inputPassword" class="form-control" placeholder="パスワード" required> <div class="checkbox"> <label> <input type="checkbox" value="remember-me"> 状態を記憶する </label> </div> <button class="btn btn-lg btn-primary btn-block" type="submit">サインイン</button> </form> </div><!-- /.container --> <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script> <script src="js/bootstrap.min.js"></script> </body> </html>