html
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>注册页面</title>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;

border-radius: 5px;
border: 1px solid #ccc;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
</style>
<div class="container">
<h2>注册新账户</h2>
<form action="/register" method="post">
<div>
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required>
</div>
<div>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required>
</div>
<div>
<label for="email">邮箱:</label>
<input type="email" id="email" name="email" required>
</div>
<div>
<input type="submit" value="注册">
</div>
</form>
</div>
这个简单的注册页面包含以下元素: 一个标题(h2)元素显示在页面顶部。 一个表单(form)元素用于收集用户输入的数据,表单包含三个输入字段(用户名、密码和邮箱),以及一个提交按钮,表单的action属性指定了提交表单时发送数据的URL(在这个例子中,是"/register"),method属性指定了发送数据的方式(在这个例子中,是POST),请确保在实际应用中替换为正确的后端处理URL。 CSS样式用于调整页面布局和外观,在这个例子中,样式使页面适应手机屏幕尺寸,并具有一定的响应性,您可以根据需要修改样式。





