How to Design Form Login Pup Up Using Bootstrap

How to Design Form Login Pup Up Using Bootstrap

How to Design Form Login Pup-Up Using Bootstrap


1.image/picture.png

2.index.php


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Login PHP</title>

    <link href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round" 
 rel="stylesheet">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/
4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/
3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/
jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/
bootstrap.min.js"></script>
    <link rel="stylesheet" href="style.css">

</head>
<body>
    <div class="text-center">
        <!-- Button HTML (to Trigger Modal) -->
        <a href="#myModal" class="trigger-btn btn-lg text-bold "  
data-toggle="modal">Click Login Pup up </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">
                        <img src="image/avatar.png" alt="Avatar">
                    </div>  
                    <h4 class="modal-title">Login</h4>
                    <button type="button" class="close" data-dismiss="modal"  
aria-hidden="true">&times;</button>
                </div>
                <div class="modal-body">
                    <form action="index.php" method="POST">
                        <div class="form-group">
                            <input type="text" class="form-control" 
  name="username" placeholder="Username">
                        </div>
                        <div class="form-group">
                            <input type="password" class="form-control" 
 name="password" placeholder="Password" >
                        </div>
                        <div class="form-group">
                            <button type="submit" 
 class="btn btn-outline-success btn-lg btn-block login-btn">Login</button>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <a href="#">Forgot Password?</a>
                </div>
            </div>
        </div>
    </div>
</body>
</html>

3.style.css


    body {
        font-family'Varela Round'sans-serif;
    }
    .modal-login {      
        color#636363;
        width350px;
    }
    .modal-login .modal-content {
        padding20px;
        border-radius5px;
        bordernone;
    }
    .modal-login .modal-header {
        border-bottomnone;   
        positionrelative;
        justify-contentcenter;
    }
    .modal-login h4 {
        text-aligncenter;
        font-size26px;
        margin30px 0 -15px;
    }
    .modal-login .form-control:focus {
        border-color#70c5c0;
    }
    .modal-login .form-control.modal-login .btn {
        min-height40px;
        border-radius3px
    }
    .modal-login .close {
        positionabsolute;
        top-5px;
        right-5px;
    }   
    .modal-login .modal-footer {
        background#ecf0f1;
        border-color#dee4e7;
        text-aligncenter;
        justify-contentcenter;
        margin0 -20px -20px;
        border-radius5px;
        font-size13px;
    }
    .modal-login .modal-footer a {
        colorrgba(9086860.61);
    }       
    .modal-login .avatar {
        positionabsolute;
        margin0 auto;
        left0;
        right0;
        top-70px;
        width95px;
        height95px;
        border-radius50%;
        z-index9;
        background#1ea2ca;
        padding15px;
        box-shadow0px 2px 2px rgba(0000.658);
    }
    .modal-login .avatar img {
        width100%;
    }
    .modal-login.modal-dialog {
        margin-top80px;
    }
    .modal-login .btn {
        color#fff;
        border-radius4px;
        background#ff0000;
        text-decorationnone;
        transitionall 0.4s;
        line-heightnormal;
        bordernone;
    }
    .modal-login .btn:hover.modal-login .btn:focus {
        background#7829b8c0;
        outlinenone;
    }
    .trigger-btn {
        displayinline-block;
        margin100px auto;
    }
Reactions

Post a Comment

0 Comments

close