写一个学生信息注册页面,要求用css美化页面,内容居中,并用将画面分为三个部分,主体在中间部分,背景为白色
时间: 2024-05-31 09:08:22 浏览: 11
<!DOCTYPE html>
<html>
<head>
<title>学生信息注册</title>
<style>
body {
background-color: #F6F6F6;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 50px;
}
.header {
background-color: #4CAF50;
color: white;
padding: 20px;
text-align: center;
font-size: 30px;
width: 100%;
box-sizing: border-box;
}
.form {
background-color: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
width: 500px;
box-sizing: border-box;
margin: 20px;
}
.form input[type="text"], .form input[type="email"], .form input[type="password"] {
width: 100%;
padding: 10px;
box-sizing: border-box;
margin-bottom: 20px;
border-radius: 5px;
border: none;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
font-size: 16px;
}
.form input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border-radius: 5px;
border: none;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s;
}
.form input[type="submit"]:hover {
background-color: #3E8E41;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
学生信息注册
</div>
<div class="form">
<form>
<label for="name">姓名:</label>
<input type="text" id="name" name="name" required>
<label for="email">邮箱:</label>
<input type="email" id="email" name="email" required>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="提交">
</form>
</div>
</div>
</body>
</html>
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.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)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)