web网页设计购物网站注册页面
时间: 2024-03-22 13:33:53 浏览: 13
以下是一个简单的web网页设计购物网站注册页面的示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>注册页面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>欢迎注册</h1>
<form action="#" method="post">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" 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>
<label for="confirm_password">确认密码:</label>
<input type="password" id="confirm_password" name="confirm_password" required>
<input type="submit" value="注册">
</form>
</div>
</body>
</html>
```
CSS样式代码:
```css
.container {
max-width: 500px;
margin: 0 auto;
padding: 20px;
background-color: #f2f2f2;
border-radius: 5px;
box-shadow: 0px 0px 10px #888888;
}
h1 {
text-align: center;
margin-bottom: 20px;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-top: 10px;
}
input[type="text"],
input[type="email"],
input[type="password"] {
padding: 10px;
border-radius: 5px;
border: none;
margin-bottom: 20px;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
```