写一个学生信息注册系统页面,要求使用css进行美化,内容居中,生日选项可以选择日期
时间: 2024-06-01 20:10:23 浏览: 21
<!DOCTYPE html>
<html>
<head>
<title>学生信息注册系统</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
font-size: 14px;
}
form {
margin: 0 auto;
width: 400px;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
h1 {
text-align: center;
font-size: 24px;
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"], select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 20px;
box-sizing: border-box;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-bottom: 20px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form>
<h1>学生信息注册系统</h1>
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required>
<label for="gender">性别:</label>
<select id="gender" name="gender">
<option value="male">男</option>
<option value="female">女</option>
</select>
<label for="birthday">生日:</label>
<input type="date" id="birthday" name="birthday" required>
<label for="phone">电话:</label>
<input type="text" id="phone" name="phone" required>
<label for="email">邮箱:</label>
<input type="text" id="email" name="email" required>
<input type="submit" value="提交">
</form>
</body>
</html>