登录、注册、忘记密码、首页HTML模板

ops/2025/1/15 6:04:24/

在这里插入图片描述

html">
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>登录</title><style>css">body {display: flex;justify-content: center;align-items: center;height: 100vh;margin: 0;background-color: #000;font-family: Arial, sans-serif;user-select: none;}body::before {content: "";position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: inherit;filter: blur(10px);z-index: -1;}.login-box {background-color: rgba(0, 0, 0, 0.5);padding: 30px;border-radius: 15px;backdrop-filter: blur(10px);width: 300px;border: 2px solid rgba(255, 255, 255, 0.2);transition: all 0.3s ease;position: relative;}.login-box h2 {margin: 0 0 30px 0;color: #fff;text-align: center;}.login-box input {width: calc(100% - 30px);padding: 15px;margin-bottom: 20px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;font-size: 16px;outline: none;transition: all 0.3s ease;color: #fff;background-color: rgba(0, 0, 0, 0.3);-webkit-appearance: none;-moz-appearance: none;appearance: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.login-box input:focus {background-color: rgba(0, 0, 0, 0.5);border-color: rgba(255, 255, 255, 0.4);}.login-box button {width: 100%;padding: 15px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;background-color: rgba(0, 0, 0, 0.5);cursor: pointer;font-size: 16px;color: #fff;transition: all 0.3s ease;}.login-box button:hover {background-color: rgba(0, 0, 0, 0.7);border-color: rgba(255, 250, 255, 0.4);}.message {color: #fff;text-align: center;padding: 10px;border-radius: 8px;overflow: hidden;position: absolute;left: 0;right: 0;bottom: -60px;transition: opacity 0.3s ease;opacity: 0;margin: 0 auto;background-color: rgba(0, 0, 255, 0.3); }.link {color: #fff;text-align: center;margin-top: 20px;cursor: pointer;}</style>
</head>
<body><div class="login-box"><h2>登录</h2><form action="#"><div class="input-container"><input type="text" id="username" placeholder="用户名"  autocomplete="off"></div><div class="input-container"><input type="password" id="password" placeholder="密码"  autocomplete="off"></div><button type="submit" id="loginButton">登录</button></form><div class="message" id="message"></div><div class="link"><span id="registerLink">前往注册</span> | <span id="forgetPasswordLink">忘记密码</span></div></div><script>document.getElementById('loginButton').addEventListener('click', function(event) {event.preventDefault();const username = document.getElementById('username').value;const password = document.getElementById('password').value;const message = document.getElementById('message');if (username && password) { message.innerHTML = '登录成功';showMessage();clearInputsAndMessage();setTimeout(() => {window.location.href = 'index.html';}, 300);} else {message.innerHTML = '登录失败,请输入用户名和密码';showMessage();clearInputsAndMessage();}});document.getElementById('registerLink').addEventListener('click', function() {window.location.href = 'register.html';});document.getElementById('forgetPasswordLink').addEventListener('click', function() {window.location.href = 'resetPassword.html';});function showMessage() {const message = document.getElementById('message');message.style.opacity = '1';}function clearInputsAndMessage() {const message = document.getElementById('message');const username = document.getElementById('username');const password = document.getElementById('password');setTimeout(() => {message.innerHTML = '';message.style.opacity = '0';username.value = '';password.value = '';}, 3000);}</script>
</body>
</html>

在这里插入图片描述

html">
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>注册</title><style>css">body {display: flex;justify-content: center;align-items: center;height: 100vh;margin: 0;background-color: #000;font-family: Arial, sans-serif;user-select: none;}body::before {content: "";position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: inherit;filter: blur(10px);z-index: -1;}.register-box {background-color: rgba(0, 0, 0, 0.5);padding: 30px;border-radius: 15px;backdrop-filter: blur(10px);width: 300px;border: 2px solid rgba(255, 255, 255, 0.2);transition: all 0.3s ease;position: relative;}.register-box h2 {margin: 0 0 30px 0;color: #fff;text-align: center;}.register-box input {width: calc(100% - 30px);padding: 15px;margin-bottom: 20px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;font-size: 16px;outline: none;transition: all 0.3s ease;color: #fff;background-color: rgba(0, 0, 0, 0.3);-webkit-appearance: none;-moz-appearance: none;appearance: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.register-box input:focus {background-color: rgba(0, 0, 0, 0.5);border-color: rgba(255, 255, 255, 0.4);}.register-box button {width: 100%;padding: 15px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;background-color: rgba(0, 0, 0, 0.5);cursor: pointer;font-size: 16px;color: #fff;transition: all 0.3s ease;}.register-box button:hover {background-color: rgba(0, 0, 0, 0.7);border-color: rgba(255, 250, 255, 0.4);}.message {color: #fff;text-align: center;padding: 10px;border-radius: 8px;overflow: hidden;position: absolute;left: 0;right: 0;bottom: -60px;transition: opacity 0.3s ease;opacity: 0;margin: 0 auto;background-color: rgba(0, 0, 255, 0.3); }.link {color: #fff;text-align: center;margin-top: 20px;cursor: pointer;}</style>
</head>
<body><div class="register-box"><h2>注册</h2><form action="#"><div class="input-container"><input type="text" id="username" placeholder="用户名" autocomplete="off"></div><div class="input-container"><input type="text" id="account" placeholder="账号" autocomplete="off"></div><div class="input-container"><input type="email" id="email" placeholder="邮箱" autocomplete="off"></div><button type="submit" id="registerButton">注册</button></form><div class="message" id="message"></div><div class="link"><span id="loginLink">返回登录</span></div></div><script>document.getElementById('registerButton').addEventListener('click', function(event) {event.preventDefault();const username = document.getElementById('username').value;const account = document.getElementById('account').value;const email = document.getElementById('email').value;const message = document.getElementById('message');if (username && account && email) { message.innerHTML = '注册成功';showMessage();clearInputsAndMessage();} else {message.innerHTML = '注册失败,请输入用户名、账号和邮箱';showMessage();clearInputsAndMessage();}});document.getElementById('loginLink').addEventListener('click', function() {window.location.href = 'login.html';});function showMessage() {const message = document.getElementById('message');message.style.opacity = '1';}function clearInputsAndMessage() {const message = document.getElementById('message');const username = document.getElementById('username');const account = document.getElementById('account');const email = document.getElementById('email');setTimeout(() => {message.innerHTML = '';message.style.opacity = '0';username.value = '';account.value = '';email.value = '';}, 3000);}</script>
</body>
</html>

在这里插入图片描述

html">
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>忘记密码页面</title><style>css">body {display: flex;justify-content: center;align-items: center;height: 100vh;margin: 0;background-color: #000;font-family: Arial, sans-serif;user-select: none;}body::before {content: "";position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: inherit;filter: blur(10px);z-index: -1;}.reset-box {background-color: rgba(0, 0, 0, 0.5);padding: 30px;border-radius: 15px;backdrop-filter: blur(10px);width: 300px;border: 2px solid rgba(255, 255, 255, 0.2);transition: all 0.3s ease;position: relative;}.reset-box h2 {margin: 0 0 30px 0;color: #fff;text-align: center;}.reset-box input {width: calc(100% - 30px);padding: 15px;margin-bottom: 20px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;font-size: 16px;outline: none;transition: all 0.3s ease;color: #fff;background-color: rgba(0, 0, 0, 0.3);-webkit-appearance: none;-moz-appearance: none;appearance: none;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.reset-box input:focus {background-color: rgba(0, 0, 0, 0.5);border-color: rgba(255, 255, 255, 0.4);}.reset-box button {width: 100%;padding: 15px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;background-color: rgba(0, 0, 0, 0.5);cursor: pointer;font-size: 16px;color: #fff;transition: all 0.3s ease;}.reset-box button:hover {background-color: rgba(0, 0, 0, 0.7);border-color: rgba(255, 250, 255, 0.4);}.message {color: #fff;text-align: center;padding: 10px;border-radius: 8px;overflow: hidden;position: absolute;left: 0;right: 0;bottom: -60px;transition: opacity 0.3s ease;opacity: 0;margin: 0 auto;background-color: rgba(0, 0, 255, 0.3); }.link {color: #fff;text-align: center;margin-top: 20px;cursor: pointer;}</style>
</head>
<body><div class="reset-box"><h2>忘记密码</h2><form action="#"><div class="input-container"><input type="text" id="account" placeholder="账号" autocomplete="off"></div><div class="input-container"><input type="email" id="email" placeholder="邮箱" autocomplete="off"></div><button type="submit" id="resetButton">提交</button></form><div class="message" id="message"></div><div class="link"><span id="loginLink">返回登录</span></div></div><script>document.getElementById('resetButton').addEventListener('click', function(event) {event.preventDefault();const account = document.getElementById('account').value;const email = document.getElementById('email').value;const message = document.getElementById('message');if (account && email) { message.innerHTML = '密码重置请求已提交,请查收邮件';showMessage();clearInputsAndMessage();} else {message.innerHTML = '请输入账号和邮箱';showMessage();clearInputsAndMessage();}});document.getElementById('loginLink').addEventListener('click', function() {window.location.href = 'login.html';});function showMessage() {const message = document.getElementById('message');message.style.opacity = '1';}function clearInputsAndMessage() {const message = document.getElementById('message');const account = document.getElementById('account');const email = document.getElementById('email');setTimeout(() => {message.innerHTML = '';message.style.opacity = '0';account.value = '';email.value = '';}, 3000);}</script>
</body>
</html>

在这里插入图片描述

html">
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>首页</title><style>css">body {margin: 0;padding: 0;font-family: Arial, sans-serif;background-color: #000;user-select: none;}body::before {content: "";position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: inherit;filter: blur(10px);z-index: -1;}.header {display: flex;justify-content: space-between;align-items: center;padding: 10px 20px;background-color: rgba(0, 0, 0, 0.7);border-bottom: 1px solid rgba(255, 255, 255, 0.2);}.system-logo {height: 40px;width: 40px;border-radius: 50%;}.logout {color: #fff;cursor: pointer;padding: 5px 10px;border: 2px solid rgba(255, 255, 255, 0.2);border-radius: 5px;transition: background-color 0.3s ease;}.logout:hover {background-color: rgba(255, 255, 255, 0.2);}.card-container {display: flex;flex-wrap: wrap;justify-content: flex-start;padding: 20px;}.card {flex: 0 0 calc(20% - 20px); background-color: rgba(0, 0, 0, 0.5);border-radius: 15px;backdrop-filter: blur(10px);border: 2px solid rgba(255, 255, 255, 0.2);margin: 10px;padding: 15px;box-sizing: border-box;display: flex;}.logo {flex: 0 0 30%;height: 80px;width: 80px;margin-right: 10px;border-radius: 20%;user-drag: none; }.card-content {flex: 0 0 70%;padding-left: 10px;}.card-content h3 {color: #fff;margin: 10px 0;}.card-content p {color: #fff;}.modal {display: none;position: fixed;z-index: 1;left: 50%;top: 50%;transform: translate(-50%, -50%);width: 300px;height: 150px;overflow: auto;background-color: rgba(0, 0, 0, 0.8);border: 2px solid rgba(255, 255, 255, 0.2);border-radius: 10px;box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);}.modal-content {padding: 20px;}.modal-content p {color: #fff; text-align: center;}.modal-buttons {display: flex;justify-content: center;margin-top: 20px;}.modal-buttons button {margin: 0 10px;padding: 10px 20px;cursor: pointer;border: none;border-radius: 5px;background-color: #007BFF;color: #fff;transition: background-color 0.3s ease;}.modal-buttons button:hover {background-color: #0056b3;}</style>
</head>
<body><div class="header"><div class="logo-container"><img class="system-logo" src="https://img2.baidu.com/it/u=3565369971,2082314928&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1736960400&t=2bbb8a8e0be6e8ae7d1b4713751f1b0f" alt="System Logo" draggable="false"></div><div class="logout" id="logout">退出登录</div></div><div class="card-container"><div class="card"><img class="logo" src="https://img2.baidu.com/it/u=3565369971,2082314928&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1736960400&t=2bbb8a8e0be6e8ae7d1b4713751f1b0f" alt="Card Logo" draggable="false"><div class="card-content"><h3>测试</h3><p>测试测试测试测试测试</p></div></div></div><div class="modal" id="modal"><div class="modal-content"><p>是否确认退出登录?</p><div class="modal-buttons"><button id="confirmLogout">确认</button><button id="cancelLogout">取消</button></div></div></div><script>document.getElementById('logout').addEventListener('click', function() {document.getElementById('modal').style.display = 'block';});document.getElementById('confirmLogout').addEventListener('click', function() {window.location.href = 'login.html';document.getElementById('modal').style.display = 'none';});document.getElementById('cancelLogout').addEventListener('click', function() {document.getElementById('modal').style.display = 'none';});</script>
</body>
</html>

http://www.ppmy.cn/ops/150218.html

相关文章

HarmonyOS中实现TabBar(相当于Android中的TabLayout+ViewPager)

参考网址&#xff1a;自定义页签切换联动 1.自定义组件TabBarView Component export struct TabBarView{State currentIndex: number 0State selectedIndex: number 0private controller: TabsController new TabsController()//tab标签内容横线布局Builder tabBuilder(ind…

cartographer全局重定位的实现

cartographer全局重定位的实现 1.简介核心流程链接代码&#xff1a; 1.简介 本博客主要介绍cartographer全局重定位的实现&#xff0c;目前已经测试能够实现在6米180度范围内的全局重定位。 核心流程 这个重定位函数的流程&#xff0c;然后逐个部分给出实现代码。 1.创建线…

DevOps实用场景:在哪些业务中应用DevOps最有效

随着科技的迅猛发展和客户需求的不断变化&#xff0c;IT初创公司在不断追求更高的效率、更快速的交付和更强的市场适应力。在这个背景下&#xff0c;DevOps成为了推动组织成功的关键策略之一。本文将帮助您了解什么是DevOps&#xff0c;哪些团队或企业最适合实施DevOps&#xf…

mybatis-spring @MapperScan走读分析

接上一篇文章&#xff1a;https://blog.csdn.net/qq_26437925/article/details/145100531&#xff0c; 本文注解分析mybatis-spring中的MapperScan注解&#xff0c;则将容易许多。 目录 MapperScan注解定义ConfigurationClassPostProcessor扫描注册beanDefinitionorg.mybatis.s…

ansible之playbook实战

环境&#xff1a; client centos server ubuntu cat pro1.yml --- - hosts: www.test.comtasks:- name: Install Httpd Serverapt: nameapache2 statepresent- name: Configurate Httpd Servercopy: content"Iam client" dest/var/www/html/index.html- name: Start…

React方向:react中5种Dom的操作方式

1、通过原生JS获取Dom去操作 通过document.querySelector(#title)原生js的方式去拿到dom节点&#xff0c;然后去进行操作。 import {Component} from "react";class App extends Component {//定义获取Dom的函数handleGetDom(){let title document.querySelector(#t…

Notepad++上NppFTP插件的安装和使用教程

一、NppFTP插件下载 图示是已经安装好了插件。 在搜索框里面搜NppFTP&#xff0c;一般情况下&#xff0c;自带的下载地址容易下载失败。这里准备了一个下载连接&#xff1a;Release v0.29.10 ashkulz/NppFTP GitHub 这里我下载的是x86版本 下载好后在nodepad的插件里面选择打…

ASP.NET Core - 依赖注入(四)

ASP.NET Core - 依赖注入&#xff08;四&#xff09; 4. ASP.NET Core默认服务5. 依赖注入配置变形 4. ASP.NET Core默认服务 之前讲了中间件&#xff0c;实际上一个中间件要正常进行工作&#xff0c;通常需要许多的服务配合进行&#xff0c;而中间件中的服务自然也是通过 Ioc…