员工管理系统登录界面的代码用vs code
时间: 2023-12-07 21:06:00 浏览: 50
以下是一个简单的员工管理系统登录界面的代码示例,使用 VS Code 编写:
```html
<!DOCTYPE html>
<html>
<head>
<title>员工管理系统登录</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;
}
.container {
margin: 100px auto;
max-width: 400px;
padding: 20px;
background-color: #fff;
box-shadow: 0px 0px 10px #ccc;
border-radius: 5px;
}
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 #ccc;
border-radius: 3px;
font-size: 16px;
}
button {
display: block;
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 3px;
font-size: 16px;
cursor: pointer;
margin-top: 10px;
}
button:hover {
background-color: #3e8e41;
}
.error {
color: red;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>员工管理系统登录</h2>
<form method="post" action="login.php">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required>
<button type="submit">登录</button>
</form>
<div class="error"><?php if(isset($error)) echo $error; ?></div>
</div>
</body>
</html>
```
请注意,此代码示例仅包含 HTML 和 CSS 代码,没有任何后端处理。如果要使此登录界面正常工作,需要创建一个名为 `login.php` 的 PHP 文件,并在其中添加处理登录请求的代码。
相关推荐
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)