<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录页面 - Bootstrap 栅格和弹性盒子布局</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
    <header class="bg-gradient-primary py-3">
        <div class="container">
            <h1 class="text-white">登录页面</h1>
        </div>
    </header>
    <main class="container">
        <div class="row mt-5">
            <div class="col-md-6 mx-auto">
                <form>
                    <div class="form-group">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
                                        <path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm4-3a4 4 0 0 0-3.465 6.062c.007.011.014.022.021.034A4.002 4.002 0 0 0 12 12h1v1H9v-1h1a4.002 4.002 0 0 0 .444-7.955C10.014 3.978 8.071 3 8.071 3S6.128 3.978 6.556 4.045A4.002 4.002 0 0 0 7 11h2V9a2 2 0 0 1 2-2h1zm-4 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"/>
                                    </svg>
                                </span>
                            </div>
                            <input type="text" class="form-control" placeholder="用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-lock" viewBox="0 0 16 16">
                                        <path d="M7 8a2 2 0 1 1 4 0V9a3 3 0 0 0-3 3v2a1 1 0 0 1-2 0v-2a3 3 0 0 0-3-3V8a3 3 0 0 0-1-2.236V5a3 3 0 0 1 3-3 2.998 2.998 0 0 1 2.825 2h.675A2.998 2.998 0 0 1 13 2a3 3 0 0 1 3 3v1a3 3 0 0 1-3 3v1.764A3 3 0 0 0 10 13a3 3 0 0 0 3 3 2.998 2.998 0 0 0 2.825-2h.675A2.998 2.998 0 0 0 16 12V11a3 3 0 0 1-3-3V8z"/>
                                    </svg>
                                </span>
                            </div>
                            <input type="password" class="form-control" placeholder="密码">
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md mb-3">
                            <button class="btn btn-primary btn-block" type="submit">登录</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md mb-3">
                            <div class="form-check">
                                <input class="form-check-input" type="checkbox" value="" id="rememberMe">
                                <label class="form-check-label" for="rememberMe">
                                    记住我
                                </label>
                            </div>
                        </div>
                        <div class="col-md mb-3">
                            <a href="#">忘记密码?</a>
                        </div>
                        <div class="col-md mb-3">
                            <a href="#">注册账号</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </main>
    <footer class="bg-light py-3">
        <div class="container d-flex justify-content-between">
            <span>注册账号</span>
            <span>扫码登录</span>
        </div>
    </footer>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>
Bootstrap 栅格和弹性盒子布局:设计实现登录页面