当前位置: 首页 > article >正文

以下是一个使用 HTML、CSS 和 JavaScript 实现的登录弹窗效果示例

以下是一个使用 HTML、CSS 和 JavaScript 实现的登录弹窗效果示例:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>登录弹窗示例</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
        }

        /* 遮罩层样式 */
        .modal-mask {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 999;
        }

        /* 弹窗容器 */
        .modal-container {
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
            width: 320px;
            animation: modalIn 0.3s ease;
        }

        /* 弹窗动画 */
        @keyframes modalIn {
            from {
                transform: translateY(-20px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* 表单样式 */
        .login-form {
            display: flex;
            flex-direction: column;
        }

        .form-group {
            margin-bottom: 15px;
        }

        input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }

        button {
            background: #2196F3;
            color: white;
            padding: 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        button:hover {
            background: #1976D2;
        }

        .close-btn {
            float: right;
            cursor: pointer;
            font-size: 24px;
            line-height: 1;
            padding: 0 8px;
        }
    </style>
</head>
<body>
    <button onclick="showLoginModal

http://www.kler.cn/a/551941.html

相关文章:

  • 【干货教程】DeepSeek R1+Open WebUI构建RAG检索增强知识库的实战教程
  • DeepSeek 助力 Vue 开发:打造丝滑的范围选择器(Range Picker)
  • 已弃用Flutter的Gradle插件的命令式应用
  • Java进阶篇之Lambda表达式
  • 蜂鸟视图发布AI智能导购产品:用生成式AI重构空间服务新范式
  • 数据库提权总结
  • 图像处理:如何把模糊变形的文档图像变清晰方正?
  • Django 5实用指南(二)项目结构与管理
  • C++ 设计模式-外观模式
  • Windows Server服务注册
  • 好书推荐 《Node-RED物联网应用开发技术详解》
  • vue3 配置@根路径
  • 【Scrapy】Scrapy教程5——第一个Scrapy项目
  • 深入探索 DeepSeek 在数据分析与可视化中的应用
  • Linux驱动学习(二)--字符设备
  • mapbox基础,使用geojson加载line线图层,实现纯色填充、图片填充、虚线和渐变效果
  • Cherry Studio 接入deepseek
  • CCF-CSP第36次认证第二题——梦境巡查【NA!!前缀和思想】
  • python爬虫系列课程1:初识爬虫
  • 鸿蒙NEXT开发-元服务的基本介绍和创建