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

网站数据库大小石家庄发布最新消息

网站数据库大小,石家庄发布最新消息,网站建设公司如何约客户,口碑好的做网站公司写了一段html代码实现的效果&#xff1a;实现右上角有个图标&#xff0c;鼠标移动到该位置出现手型&#xff0c;点击会弹出登录窗口。功能实现前端&#xff0c;没有实现后端。<!DOCTYPE html> <html lang"zh-CN"> <head><meta charset"UTF…

写了一段html代码

实现的效果:

实现右上角有个图标,鼠标移动到该位置出现手型,点击会弹出登录窗口。

功能实现前端,没有实现后端。

<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>精选商品</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"><style>/* 遮罩层 */.modal-overlay {transition: opacity 0.3s ease;opacity: 0;pointer-events: none;}.modal-overlay.active {opacity: 1;pointer-events: all;}/* 登录窗口 */.login-modal {position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%) scale(0.95);opacity: 0;pointer-events: none;transition: all 0.3s ease;z-index: 50;}.login-modal.active {transform: translate(-50%, -50%) scale(1);opacity: 1;pointer-events: all;}</style>
</head>
<body class="bg-gray-100 relative"><!-- 右上角登录图标 -->
<div class="absolute top-4 right-4 z-10"><button id="loginBtn" class="w-12 h-12 rounded-full bg-blue-500 flex items-center justify-center text-white shadow hover:bg-blue-600 transition cursor-pointer"><i class="fa-solid fa-user text-xl"></i></button>
</div><!-- 登录窗口遮罩层 -->
<div id="modalOverlay" class="modal-overlay fixed inset-0 bg-black/50"></div><!-- 登录窗口 -->
<div id="loginModal" class="login-modal bg-white rounded-lg shadow-xl w-full max-w-md p-6"><div class="flex justify-end mb-4"><button id="closeBtn" class="text-gray-500 hover:text-gray-700 transition"><i class="fa-solid fa-times text-xl"></i></button></div><div class="space-y-4"><h2 class="text-2xl font-bold text-center text-gray-800">账号登录</h2><div><label for="username" class="block text-sm font-medium text-gray-700 mb-1">用户名/手机号</label><input type="text" id="username" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition" placeholder="请输入用户名或手机号"></div><div><label for="password" class="block text-sm font-medium text-gray-700 mb-1">密码</label><input type="password" id="password" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition" placeholder="请输入密码"></div><div class="flex items-center justify-between"><label class="flex items-center text-sm text-gray-600"><input type="checkbox" class="mr-2 h-4 w-4 text-blue-500 focus:ring-blue-500 border-gray-300 rounded">记住我</label><a href="#" class="text-sm text-blue-500 hover:text-blue-600 transition">忘记密码?</a></div><button class="w-full bg-blue-500 text-white font-medium py-2 px-4 rounded-lg hover:bg-blue-600 transition">登录</button><div class="text-center text-sm text-gray-600 mt-4">还没有账号?<a href="#" class="text-blue-500 hover:text-blue-600 font-medium transition">立即注册</a></div></div>
</div><script>const loginBtn = document.getElementById('loginBtn');const loginModal = document.getElementById('loginModal');const closeBtn = document.getElementById('closeBtn');const modalOverlay = document.getElementById('modalOverlay');function openLoginModal() {loginModal.classList.add('active');modalOverlay.classList.add('active');document.body.style.overflow = 'hidden';}function closeLoginModal() {loginModal.classList.remove('active');modalOverlay.classList.remove('active');document.body.style.overflow = '';}loginBtn.addEventListener('click', openLoginModal);closeBtn.addEventListener('click', closeLoginModal);modalOverlay.addEventListener('click', closeLoginModal);document.addEventListener('keydown', (e) => {if (e.key === 'Escape' && loginModal.classList.contains('active')) {closeLoginModal();}});
</script>
</body>
</html>

http://www.dtcms.com/a/544986.html

相关文章:

  • 本地运行Tomcat项目
  • 大模型如何变身金融风控专家
  • 台州网站建设维护网页设计与制作教程杨选辉
  • 动力网站移动端模板网站建设价格
  • Windows 10终止服务支持:企业IT安全迎来重大考验
  • Mac os安装Easyconnect卡在正在验证软件包
  • 手机网站免费模板下载门户网站 销售
  • 学习和掌握RabbitMQ及其与springboot的整合实践(篇二)
  • Flink、Storm、Spark 区别
  • 当 AI Agent 遇上工作流编排:微软 Agent Framework 的 Workflow 深度解析
  • 5步构建多模式内容策略:统一品牌信息,最大化内容影响力
  • STP 转换为 3DXML 的技术指南及迪威模型网在线转换推荐
  • 如何建设视频网站好的网站设计题目
  • 深入理解 Vite 开发服务器的 Local 与 Network 地址
  • 免费建立网站的网站吗免费软件视频
  • 和利时 PLC 配网
  • 时间序列数据预测:14种机器学习与深度学习模型
  • 手机网站编程语言finecms
  • 第六部分:VTK进阶(第178章 网格质量评估vtkMeshQuality)
  • 多模态+CLIP | 视觉语言交互的终极形态?CLIP融合AIGC与持续学习,重塑多模态AI边界
  • Linux下CMake工具使用与Makefile生成完全指南
  • 关系型数据库、非关系型数据库、结构化数据、半结构化数据、非结构化数据、OLAP、OLTP的关系和区分
  • 成都市成华区建设局网站拐角型布局网站
  • java 文本内容 相似度比对
  • 切换jdk17
  • 定制型网站 成功案例网站建设费 税前扣除吗
  • 【SpringMVC】SpringMVC 请求与响应全解析:从 Cookie/Session 到状态码、Header 配置
  • 兰州网站建设ulezhi郑州网站建设培训短期班
  • 8.1.2 大数据方法论与实践指南-埋点实现方式分类
  • 7.1.5 大数据方法论与实践指南-日志系统+监控报警