html
<title>注册页面</title>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
input[type=text], input[type=password], input[type=email] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;

display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
</style>
<div class="container">
<h2>注册</h2>
<form action="/register" method="post"> <!-- 这里假设你的后端服务器接收注册的URL是 ’/register’ -->
<div>
<label for="username"><b>用户名</b></label>
<input type="text" id="username" name="username" required>
</div>
<div>
<label for="email"><b>电子邮件</b></label>
<input type="email" id="email" name="email" required> <!-- 用于验证电子邮件格式 -->
</div>
<div>
<label for="password"><b>密码</b></label> <!-- 注意:在实际应用中,密码应该被正确地加密和存储 -->
<input type="password" id="password" name="password" required> <!-- 密码输入框 -->
</div> <!-- 可以根据需要添加更多字段,如姓名、地址等 -->









