Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Bootstrap Classic Modal Login Modal Form with Avatar Icon</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script> <style type="text/css"> body { font-family: 'Varela Round', sans-serif; } .form-control { box-shadow: none; border-color: #ddd; } .form-control:focus { border-color: #FB6E9D; box-shadow: 0 0 8px rgba(251,110,157,0.4); } .modal-login { color: #434343; width: 350px; } .modal-login .modal-content { padding: 20px; border-radius: 1px; border: none; position: relative; } .modal-login .modal-header { border-bottom: none; } .modal-login h4 { text-align: center; font-size: 22px; margin-bottom: -10px; } .modal-login .avatar { color: #fff; margin: 0 auto; text-align: center; width: 100px; height: 100px; border-radius: 50%; z-index: 9; background: #FB6E9D; padding: 15px; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.1); } .modal-login .avatar i { font-size: 62px; } .modal-login .form-control, .modal-login .btn { min-height: 40px; border-radius: 1px; transition: all 0.5s; } .modal-login .hint-text { text-align: center; padding-top: 10px; } .modal-login .close { position: absolute; top: 15px; right: 15px; } .modal-login .btn { background: #FB6E9D; border: none; line-height: normal; } .modal-login .btn:hover, .modal-login .btn:focus { background: #fb3c7a; } .modal-login .hint-text a { color: #999; } .trigger-btn { display: inline-block; margin: 100px auto; } </style> </head> <body> <div class="text-center"> <!-- Button HTML (to Trigger Modal) --> <a href="#myModal" class="trigger-btn" data-toggle="modal">Click to Open Login Modal</a> </div> <!-- Modal HTML --> <div id="myModal" class="modal fade"> <div class="modal-dialog modal-login"> <div class="modal-content"> <div class="modal-header"> <div class="avatar"><i class="material-icons"></i></div> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <form action="/examples/actions/confirmation.php" method="post"> <div class="form-group"> <input type="text" class="form-control" placeholder="Username" required="required"> </div> <div class="form-group"> <input type="password" class="form-control" placeholder="Password" required="required"> </div> <div class="form-group"> <input type="submit" class="btn btn-primary btn-block btn-lg" value="Login"> </div> </form> <div class="hint-text small"><a href="#">Forgot Your Password?</a></div> </div> </div> </div> </div> </body> </html>