完全功能登录界面的代码html
时间: 2023-08-10 22:03:15 浏览: 28
以下是一个简单的完全功能登录界面的 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;
font-family: Arial, sans-serif;
}
form {
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 5px;
padding: 20px;
margin: 50px auto;
max-width: 400px;
}
h2 {
text-align: center;
margin-top: 0;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 5px;
margin-bottom: 20px;
box-sizing: border-box;
}
button[type="submit"] {
background-color: #4CAF50;
color: #ffffff;
border: none;
border-radius: 5px;
padding: 10px;
font-size: 16px;
cursor: pointer;
width: 100%;
}
button[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form>
<h2>Login</h2>
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<button type="submit">Login</button>
</form>
</body>
</html>
```
这个代码示例包括一个 HTML 表单,其中包括一个用户名字段、一个密码字段和一个提交按钮。CSS 样式被用来使表单看起来更漂亮,包括背景色、边框、圆角、内边距和按钮颜色。请注意,这只是一个简单的示例,并且可以根据需要进行修改和定制。