模态框登录bootstrap

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./bootstrap-5.1.3-dist/js/bootstrap.js"></script>
    <link rel="stylesheet" href="./bootstrap-5.1.3-dist/css/bootstrap.css">
</head>
<body>
    <button class="btn btn-primary float-end" data-bs-toggle="modal" data-bs-target="#a">登录</button>
    <div class="modal" id="a" data-bs-backdrop="static">
        <div class="modal-dialog modal-sm">
           <div class="modal-content bg-light">
                <div class="modal-header">
                    登录百度账号
                    <button class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">

                    <div class="row mb-3">
                        
                        <div class="col-md-9  mx-auto">
                            <input type="text"  class="form-control"placeholder="手机/邮箱/用户名">
                        </div>
                    </div>

                    <div class="row mb-3">
                    
                        <div class="col-md-9 mx-auto">
                            <input type="password"  class="form-control"placeholder="密码">
                        </div>

                    </div>
  <div class="form-check">
    <input type="checkbox" class="form-check-input">
    <label for="form-check-input">
下次自动登录
</label>

<div class="modal-footer">
    
    <button class="btn btn-primary  w-100" data-bs-dismiss="modal">登录</button>
</div>
</div>
                </div>
               
            </div>
        </div>
    </div>
    
</body>
</html>

效果

相关推荐
CharlesYu013 小时前
前端性能优化的第一性原理,是不断缩短“用户发起意图 → 获得可用结果”之间的时间
前端
平头哥技术团队3 小时前
Day 21 _ 页内锚点_给每段起个 id,目录写 href=_#id_,点一下页面就滚到那一段
前端·html·html5
子兮曰4 小时前
Bun v1.4.1 深度解析:从 Zig 到 Rust,一场 11 天、64 个 AI 代理的语言迁徙
前端·后端·bun
人民广场吃泡面4 小时前
什么是AI Agent?它又能给前端带来哪些效率提升?
前端·人工智能
中科三方5 小时前
两家域名注册商资质被ICANN终止:企业域名资产安全再受关注
前端·网络·安全·域名
bug总结5 小时前
uniapp vue3全局方法注册使用
前端·javascript·uni-app
华无丽言6 小时前
如何在宜搭中实现获取子表中的字段值赋值到父表中?
前端·javascript·低代码
IT_陈寒6 小时前
Vue的computed属性竟然坑了我一把
前端·人工智能·后端
威斯软科的老司机6 小时前
通俗讲解 CNN 图像识别、向量 Embedding、Softmax 概率计算这三块的简化原理
前端·人工智能·ui·数字孪生
泯泷7 小时前
手搓JSVM第 12 篇:完整最小 JSVM 实现与源码设计复盘
前端·javascript·前端框架