写一个登录界面html代码包含注册忘记密码
时间: 2023-08-11 09:04:59 浏览: 45
以下是一个简单的登录界面 HTML 代码,包含注册和忘记密码链接。
```html
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: #f2f2f2;
}
form {
background-color: #fff;
border: 1px solid #ccc;
border-radius: 5px;
padding: 20px;
margin: 50px auto;
max-width: 400px;
text-align: center;
}
input[type="text"], input[type="password"] {
padding: 10px;
margin-bottom: 20px;
border: none;
border-radius: 5px;
width: 100%;
font-size: 16px;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
a {
color: #666;
text-decoration: none;
font-size: 14px;
}
a:hover {
color: #000;
}
</style>
</head>
<body>
<form>
<h2>Login</h2>
<input type="text" placeholder="Username" required><br>
<input type="password" placeholder="Password" required><br>
<input type="submit" value="Login">
<p>
Don't have an account? <a href="#">Register</a><br>
Forgot your password? <a href="#">Reset Password</a>
</p>
</form>
</body>
</html>
```
这段代码创建了一个简单的登录表单,包含用户名和密码输入框,以及登录按钮。在表单下方,有两个链接,一个用于注册,另一个用于重置密码。你可以将这些链接更改为实际的注册和重置密码页面的链接。