html做一个登录注册页面
时间: 2023-07-25 19:43:11 浏览: 33
好的,下面是一个简单的登录注册页面的HTML代码,你可以根据自己的需求进行修改和完善:
```html
<!DOCTYPE html>
<html>
<head>
<title>登录注册页面</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
}
h1 {
margin: 0;
}
form {
margin: 20px auto;
max-width: 500px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f1f1f1;
}
input[type="text"],
input[type="password"],
input[type="email"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 3px;
box-sizing: border-box;
}
input[type="submit"] {
background-color: #333;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 3px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #444;
}
</style>
</head>
<body>
<header>
<h1>登录注册页面</h1>
</header>
<form action="#" method="post">
<h2>登录</h2>
<label for="login-email">邮箱:</label>
<input type="email" id="login-email" name="login-email" required>
<label for="login-password">密码:</label>
<input type="password" id="login-password" name="login-password" required>
<input type="submit" value="登录">
</form>
<form action="#" method="post">
<h2>注册</h2>
<label for="register-email">邮箱:</label>
<input type="email" id="register-email" name="register-email" required>
<label for="register-password">密码:</label>
<input type="password" id="register-password" name="register-password" required>
<label for="register-confirm-password">确认密码:</label>
<input type="password" id="register-confirm-password" name="register-confirm-password" required>
<input type="submit" value="注册">
</form>
</body>
</html>
```
这个页面包含了一个登录表单和一个注册表单,你可以根据需要自行修改表单中的输入项和样式。