html
<title>注册和登录页面</title>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
width: 300px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
h2 {
text-align: center;

}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
margin-bottom: 10px;
}
input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

</style>
<div class="container">
<h2>注册</h2>
<form action="/register" method="post"> <!-- 注册表单提交到服务器上的注册接口 -->
<input type="text" name="username" placeholder="用户名" required>
<input type="password" name="password" placeholder="密码" required>
<input type="submit" value="注册">
</form>
<h2>登录</h2>
<form action="/login" method="post"> <!-- 登录表单提交到服务器上的登录接口 -->
<input type="text" name="username" placeholder="用户名" required>
<input type="password" name="password" placeholder="密码" required>
<input type="submit" value="登录">
</form>
</div>
这是一个基本的注册和登录页面的HTML代码,包含了两个表单,分别用于注册和登录,表单中的输入字段包括用户名和密码,提交按钮用于将表单数据提交到服务器上的相应接口(/register和/login),你可以根据自己的需求进行修改和扩展,这只是一个简单的示例,实际的注册和登录功能需要后端服务器来处理。
TIME
