html静态登录页面
时间: 2023-07-25 08:23:17 浏览: 41
以下是一个简单的 HTML 静态登录页面的示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
form {
background-color: #ffffff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
padding: 20px;
width: 300px;
margin: 0 auto;
}
h1 {
text-align: center;
}
input[type="text"], input[type="password"] {
padding: 10px;
width: 100%;
border: 1px solid #ccc;
border-radius: 3px;
margin-bottom: 10px;
box-sizing: border-box;
}
input[type="submit"] {
background-color: #4CAF50;
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 3px;
width: 100%;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<form action="#" method="post">
<h1>Login</h1>
<label for="username">Username:</label>
<input type="text" id="username" name="username" placeholder="Enter your username">
<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter your password">
<input type="submit" value="Login">
</form>
</body>
</html>
```
这个登录页面包含一个表单,其中有一个用户名输入框,一个密码输入框和一个提交按钮。当用户点击提交按钮时,表单数据将被发送到服务器进行验证。请注意,此页面只是静态页面,没有任何后端代码来验证用户输入。