content logo

Bootstrap Forms:

Simple Login Form with Hover Effect using Bootstrap

The appearance of the website is one of the most critical elements to attract people at first glance. When visitors enter your website, they face the login form for the first time. So, you should try to use an attractive shape to interest them quickly. We have prepared the Simple Login Form with Hover Effect using Bootstrap here for you to use functionally. As you see in the preview, this Simple Login Form Code has a simple theme. Therefore, if you have a simple website, the following code is a great item. This Bootstrap Login Form has a white background, but it has a factor that differs this code from others.

The most significant characteristic of this HTML Login Form is its hover effect. This Login Form Effect has two fields related to email and password. When you move the mouse on these sections, a beautiful hover effect appears smoothly. This effect shows email and password in a small blue field. If you forget your password, you can easily select this related part. This Bootstrap Hover Effect has a blue login button, and the writing is white. If you don’t have an account, you can sign-up quickly.

#

Simple Login Form Code

#

Bootstrap Login Form

#

HTML Login Form

#

Login Form Effect

#

Bootstrap Hover Effect

<!-- This script got from frontendfreecode.com -->
<div class="form-bg">
    <div class="container">
        <div class="row">
            <div class="col-md-offset-3 col-md-6">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label for="exampleInputEmail1">Email</label>
                        <i class="fa fa-envelope-o"></i>
                        <input required="" name="login[username]" type="email" class="form-control" id="exampleInputEmail1" placeholder="Email" />
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">Password</label>
                        <i class="fa fa-lock"></i>
                        <input required="" name="login[password]" type="password" class="form-control" placeholder="Password" />
                        <a href="#" class="forgot-pass">forgot?</a>
                    </div>
                    <div class="form-group">
                        <div class="signup">
                            No account?
                            <a href="#">signup</a>
                        </div>
                        <button type="submit" class="btn btn-default">login</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
body {
    margin: 20px;
    background: #ddd;
}
.form-bg {
    background: #ddd;
}
.form-horizontal {
    background: #fff;
    padding: 80px 50px;
}
.form-horizontal .form-group {
    margin: 0 0 30px 0;
    position: relative;
}
.form-horizontal .form-group:last-child {
    margin: 40px 0 0 0;
}
.form-horizontal .form-group i {
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 18px;
    color: #c4c4c4;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.form-horizontal .form-control {
    height: 50px;
    background: #fff;
    border: 2px solid #d9d9d9;
    box-shadow: none;
    padding: 0 20px 0 50px;
    font-size: 16px;
    color: #7f8291;
    position: relative;
    transition: all 0.3s ease 0s;
}
.form-horizontal .form-control[type="password"] {
    padding: 0 105px 0 50px;
}
.form-horizontal .form-control:focus {
    box-shadow: none;
    outline: 0 none;
    border-color: #4b92e3;
}
.form-horizontal .form-control::-webkit-input-placeholder,
.form-horizontal .form-control::-moz-placeholder,
.form-horizontal .form-control::placeholder {
    color: #c4c4c4;
}
.form-horizontal .form-group label {
    padding: 0 7px;
    background: #4b92e3;
    font-size: 14px;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border-radius: 3px;
    opacity: 0;
    z-index: 1;
    position: absolute;
    top: 9px;
    left: 15px;
    transition: all 0.3s ease 0s;
}
.form-horizontal .form-group:hover label {
    opacity: 1;
    top: -9px;
}
.form-horizontal .forgot-pass {
    padding: 5px 10px;
    font-size: 16px;
    font-weight: bold;
    color: #4b92e3;
    text-transform: capitalize;
    position: absolute;
    top: 50%;
    right: 10px;
    border-left: 1px solid #d8d8d8;
    transform: translateY(-50%);
}
.form-horizontal .signup {
    display: inline-block;
    font-size: 16px;
    color: #8f8f8f;
    text-transform: capitalize;
    margin-top: 8px;
}
.form-horizontal .signup a {
    color: #4b92e3;
}
.form-horizontal .btn {
    padding: 8px 30px;
    background: #4b92e3;
    float: right;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border-radius: 6px;
    text-transform: uppercase;
}
.form-horizontal .btn:focus {
    background: #4b92e3;
    color: #fff;
}
@media only screen and (max-width: 479px) {
    .form-horizontal {
        padding: 40px 20px;
    }
    .form-horizontal .form-group:last-child {
        text-align: center;
        margin-top: 0;
    }
    .form-horizontal .signup {
        display: block;
        margin-bottom: 10px;
    }
    .form-horizontal .btn {
        float: none;
    }
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
body {
    margin: 20px;
    background: #ddd;
}
.form-bg {
    background: #ddd;
}
.form-horizontal {
    background: #fff;
    padding: 80px 50px;
}
.form-horizontal .form-group {
    margin: 0 0 30px 0;
    position: relative;
}
.form-horizontal .form-group:last-child {
    margin: 40px 0 0 0;
}
.form-horizontal .form-group i {
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 18px;
    color: #c4c4c4;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.form-horizontal .form-control {
    height: 50px;
    background: #fff;
    border: 2px solid #d9d9d9;
    box-shadow: none;
    padding: 0 20px 0 50px;
    font-size: 16px;
    color: #7f8291;
    position: relative;
    transition: all 0.3s ease 0s;
}
.form-horizontal .form-control[type="password"] {
    padding: 0 105px 0 50px;
}
.form-horizontal .form-control:focus {
    box-shadow: none;
    outline: 0 none;
    border-color: #4b92e3;
}
.form-horizontal .form-control::-webkit-input-placeholder,
.form-horizontal .form-control::-moz-placeholder,
.form-horizontal .form-control::placeholder {
    color: #c4c4c4;
}
.form-horizontal .form-group label {
    padding: 0 7px;
    background: #4b92e3;
    font-size: 14px;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border-radius: 3px;
    opacity: 0;
    z-index: 1;
    position: absolute;
    top: 9px;
    left: 15px;
    transition: all 0.3s ease 0s;
}
.form-horizontal .form-group:hover label {
    opacity: 1;
    top: -9px;
}
.form-horizontal .forgot-pass {
    padding: 5px 10px;
    font-size: 16px;
    font-weight: bold;
    color: #4b92e3;
    text-transform: capitalize;
    position: absolute;
    top: 50%;
    right: 10px;
    border-left: 1px solid #d8d8d8;
    transform: translateY(-50%);
}
.form-horizontal .signup {
    display: inline-block;
    font-size: 16px;
    color: #8f8f8f;
    text-transform: capitalize;
    margin-top: 8px;
}
.form-horizontal .signup a {
    color: #4b92e3;
}
.form-horizontal .btn {
    padding: 8px 30px;
    background: #4b92e3;
    float: right;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    border-radius: 6px;
    text-transform: uppercase;
}
.form-horizontal .btn:focus {
    background: #4b92e3;
    color: #fff;
}
@media only screen and (max-width: 479px) {
    .form-horizontal {
        padding: 40px 20px;
    }
    .form-horizontal .form-group:last-child {
        text-align: center;
        margin-top: 0;
    }
    .form-horizontal .signup {
        display: block;
        margin-bottom: 10px;
    }
    .form-horizontal .btn {
        float: none;
    }
}
</style>

</head>
<body>
<div class="form-bg">
    <div class="container">
        <div class="row">
            <div class="col-md-offset-3 col-md-6">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label for="exampleInputEmail1">Email</label>
                        <i class="fa fa-envelope-o"></i>
                        <input required="" name="login[username]" type="email" class="form-control" id="exampleInputEmail1" placeholder="Email" />
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">Password</label>
                        <i class="fa fa-lock"></i>
                        <input required="" name="login[password]" type="password" class="form-control" placeholder="Password" />
                        <a href="#" class="forgot-pass">forgot?</a>
                    </div>
                    <div class="form-group">
                        <div class="signup">
                            No account?
                            <a href="#">signup</a>
                        </div>
                        <button type="submit" class="btn btn-default">login</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>

</body>
</html>
Preview