帮我生成一个登录页面的代码
时间: 2023-02-19 16:47:17 浏览: 57
当然!下面是一个简单的 HTML + CSS 登录页面代码:
```
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<style>
.container {
width: 400px;
margin: 0 auto;
text-align: center;
}
input[type="text"], input[type="password"] {
width: 200px;
height: 30px;
margin-top: 20px;
padding-left: 10px;
}
input[type="submit"] {
width: 120px;
height: 35px;
margin-top: 20px;
background-color: cornflowerblue;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<form action="">
<label for="username">Username:</label>
<input type="text" id="username" name="username">
<br>
<label for="password">Password:</label>
<input type="password" id="password" name="password">
<br>
<input type="submit" value="Login">
</form>
</div>
</body>
</html>
```
这是一个简单的 HTML 登录页面代码,它使用 CSS 设置了样式。请注意,此代码仅供参考,并不能直接用于生产环境,需要加入额外的安全措施。