Bootstrap快速搭建登录界面

实现方法

代码如下:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <title>用户登录</title>
    <link href="Content/bootstrap.min.css" rel="stylesheet" />
    <style>
        body
        {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: url(Images/bg.jfif) no-repeat;
            background-size: 100% 100%;
            background-attachment: fixed;
        }

        form
        {
            width: 400px;
            margin: 200px auto;
            padding: 20px 30px;
            background-color: rgba(255, 255, 255, 0.8);
        }

            form div
            {
                margin-bottom:10px;
            }

        a:link, a:visited, a:hover, a:active
        {
            text-decoration: none;
            color: rgba(0, 0, 0, 0.5);
        }
    </style>
    <script src="Scripts/jquery-3.0.0.min.js"></script>
    <script src="Scripts/popper.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
</head>
<body>
    <div class="container">
        <form action="Handlers/LoginHandler.ashx" method="post" onsubmit="return login()">
            <div style="margin-bottom:20px;">
                <h2 style="text-align:center;">用户登录</h2>
            </div>
            <div class="form-group has-success has-feedback">
                <input type="text" class="form-control" id="username" placeholder="用户名">
                <span class="glyphicon glyphicon-user form-control-feedback"></span>
            </div>
            <div class="form-group has-success has-feedback">
                <input type="password" class="form-control" id="password" placeholder="密码">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="form-check">
                <label class="form-check-label">
                    <input type="checkbox" class="form-check-input" value=""><span style="font-size:15px;">记住我</span>
                </label>
            </div>
            <div>
                <button type="submit" class="btn btn-primary btn-block">登录</button>
            </div>
            <div>
                <a href="#" style="display:inline;font-size:15px;">还未注册</a>
                <a href="#" style="display:inline;font-size:15px;margin-left:185px;">忘记密码?</a>
            </div>
        </form>
    </div>
</body>
</html>

在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值