这是一个基本的网站注册页面的HTML和CSS代码示例。请注意,这只是一个基本的示例,实际的注册页面可能需要更复杂的功能,如验证用户输入,连接到数据库等。这些功能通常需要后端编程和数据库知识。

HTML代码:
<!DOCTYPE html>
<html>
<head>
<title>注册页面</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="register-page">
<h2>注册新用户</h2>
<form action="/register" method="post">
<div class="form-group">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="email">电子邮件:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="password">密码:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group">
<label for="confirm_password">确认密码:</label>
<input type="password" id="confirm_password" name="confirm_password" required>
</div>
<button type="submit">注册</button>
</form>
</div>
</body>
</html>CSS代码(styles.css):
body {
font-family: Arial, sans-serif;
}
.register-page {
width: 300px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
h2 {
text-align: center;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"], input[type="email"], input[type="password"] {
width: 100%;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
}
button[type="submit"] {
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: white; border-radius: 5px; border: none; cursor: pointer; outline: none; transition: all 0.3s ease; background-size: 200% auto; background-position: center center; box-shadow: 0px 0px 3px grey; } button[type="submit"]:hover { background-color: #45a049; } button[type="submit"]:active { background-color: #f1f1f1 !important; box-shadow: none !important; } button[type="submit"]:focus { background-color: #4CAF50 !important; outline: none !important; } .error { color: red; } input[type=text]:not(:valid) ~ .error { color:#FF0033;} input[type=email]:not







