TIME2026-04-03 20:15:47

shopee 接码网[E269]

搜索
热点
新闻分类
友情链接
首页 > 资讯 > 网站注册界面代码大全
资讯
网站注册界面代码大全
2025-12-21IP属地 美国0

HTML代码。

网站注册界面代码大全

<!DOCTYPE html>
<html>
<head>
    <title>注册页面</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
    <div class="register-container">
        <h2>注册</h2>
        <form id="registerForm">
            <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 minlength="8">
            </div>
            <div class="form-group">
                <label for="confirmPassword">确认密码:</label>
                <input type="password" id="confirmPassword" name="confirmPassword" required minlength="8">
            </div>
            <button type="submit" id="registerBtn">注册</button>
        </form>
    </div>
    <script src="script.js"></script>
</body>
</html>

CSS代码(styles.css):

网站注册界面代码大全

body {
    font-family: Arial, sans-serif;
}
.register-container {
    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: 1px solid #ccc;
    border-radius: 3px;
}
button[type=submit] {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;                                       border: none;  cursor: pointer;  border-radius: 3px;  color: white;  text-align: center;  transition: all 0.5s ease;  outline: none;  } button[type=submit]:hover { background-color: #45a049; color: black; } button[type=submit]:active { background-color: #f1f1f1;} input[type=submit]:focus { outline: none;} input[type=submit]:hover { background:#ffccbc;} input[type=submit]:active { background:#ffccbc;} input::-webkit-input-placeholder { color:#f9f9f9;} input:-moz-placeholder { color:#f9f9f9;} input::-moz-placeholder { color:#f9f9f9;} input:-ms-input-placeholder { color:#f9f9f9;} .form-group label { display:inline-block; margin-bottom:5