写一个学生宿舍管理系统登录首页
时间: 2023-10-09 20:12:53 浏览: 38
以下是一个简单的学生宿舍管理系统登录首页的代码示例:
```
<!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;
}
form {
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 5px;
box-shadow: 2px 2px 5px #cccccc;
padding: 20px;
margin: 50px auto;
max-width: 500px;
}
h1 {
text-align: center;
margin-top: 0;
}
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<form action="login.php" method="post">
<h1>学生宿舍管理系统</h1>
<label for="username">用户名</label>
<input type="text" id="username" name="username" placeholder="请输入用户名" required>
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="请输入密码" required>
<button type="submit">登录</button>
</form>
</body>
</html>
```
该页面使用HTML和CSS实现,包括一个表单,其中包含用户名和密码输入框以及登录按钮。当用户单击登录按钮时,表单将提交到login.php页面进行处理,以验证用户的凭据。请注意,此示例仅用于演示目的,如果您正在开发生产环境的宿舍管理系统,请务必使用安全性更高的验证方法。