html+css简单登录注册及密码重置页面
以下是一个简单的HTML和CSS结合的登录注册及密码重置页面的示例代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login & Register Form</title>
<style>
body { font-family: Arial, sans-serif; }
.form-container { max-width: 300px; margin: 50px auto; }
form { display: flex; flex-direction: column; }
form label { margin-bottom: 10px; }
form input[type="text"], form input[type="password"] { margin-bottom: 10px; }
form button { margin-top: 10px; }
</style>
</head>
<body>
<div class="form-container">
<h2>Login</h2>
<form id="login-form">
<label for="login-username">Username:</label>
<input type="text" id="login-username" required>
<label for="login-password">Password:</label>
<input type="password" id="login-password" required>
<button type="submit">Login</button>
</form>
<h2>Register</h2>
<form id="register-form">
<label for="register-username">Username:</label>
<input type="text" id="register-username" required>
<label for="register-email">Email:</label>
<input type="text" id="register-email" required>
<label for="register-password">Password:</label>
<input type="password" id="register-password" required>
<button type="submit">Register</button>
</form>
<h2>Forgot Password?</h2>
<form id="forgot-password-form">
<label for="forgot-password-email">Email:</label>
<input type="text" id="forgot-password-email" required>
<button type="submit">Reset Password</button>
</form>
</div>
</body>
</html>
这个示例提供了简单的登录注册及密码重置表单。CSS样式使得表单有基本的排版和对齐,提升用户体验。HTML结构清晰,容易修改和扩展。
评论已关闭