一个html《登录界面》

emm。。。。

这是一个有一点点黑暗的“登录界面”

html源码

<!DOCTYPE html>
<html>
<head>
    <title>Login Page</title>
    <style>
        body {
            background-color: #000;
            color: #fff;
            text-align: center;
            padding-top: 100px;
            font-family: 'Courier New', Courier, monospace;
        }

        h1 {
            font-size: 50px;
            margin-bottom: 30px;
            color: #ff0000;
            text-shadow: 0 0 10px #ff0000;
        }

        table {
            margin: 0 auto;
            width: 400px;
        }

        th,
        td {
            padding: 10px;
        }

        input[type="text"],
        input[type="date"] {
            width: 300px;
            padding: 5px;
            border-radius: 5px;
            border: 1px solid #ff0000;
            background-color: #000;
            color: #ff0000;
        }

        input[type="submit"] {
            margin-top: 20px;
            padding: 10px;
            background-color: #ff0000;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            animation: pulseEffect 1s infinite;
        }

        input[type="submit"]:hover {
            background-color: #ff6666;
            animation: none;
        }

        .success-message {
            margin-top: 30px;
            display: none;
            animation: fadeInEffect 2s;
        }

        .checkbox-option {
            margin-top: 20px;
            animation: slideInEffect 2s;
        }

        .contact-info {
            margin-top: 40px;
            animation: bounceEffect 1.5s infinite;
        }

        /* Animations */
        @keyframes pulseEffect {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.2);
            }

            100% {
                transform: scale(1);
            }
        }

        @keyframes fadeInEffect {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @keyframes slideInEffect {
            from {
                transform: translateX(-100%);
            }
            to {
                transform: translateX(0);
            }
        }

        @keyframes bounceEffect {
            0%,
            100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.2);
            }
        }
    </style>
    <script>
        window.onload = function () {
            document.querySelector('form').addEventListener('submit', function (event) {
                event.preventDefault();
                var successMessage = document.getElementById('successMessage');
                successMessage.style.display = 'block';
                successMessage.style.animation = 'fadeInEffect 2s forwards';

                var submitButton = document.getElementById('submitButton');
                submitButton.disabled = true;
            });

            document.getElementById('closeButton').addEventListener('click', function () {
                var successMessage = document.getElementById('successMessage');
                successMessage.style.display = 'none';
            });
        }
    </script>
</head>
<body>
    <h1>死亡协议</h1>
    <form>
        <table>
            <tr>
                <th>受害者姓名</th>
                <td><input type="text"></td>
            </tr>
            <tr>
                <th>身份证号码</th>
                <td><input type="text"></td>
            </tr>
            <tr>
                <th>iphone</th>
                <td><input type="text"></td>
            </tr>
            <tr>
                <th>邮箱</th>
                <td><input type="text"></td>
            </tr>
            <tr>
                <th>预定日期</th>
                <td><input type="date"></td>
            </tr>
        </table>
        <input id="submitButton" type="submit" value="签署协议">
    </form>
    <div id="successMessage" class="success-message">
        <p>最近自杀人数较多,可能会延期</p>
        <button id="closeButton">关闭</button>
    </div>
    <div class="checkbox-option">
        <input type="checkbox" id="agreementCheckbox">
        <label for="agreementCheckbox">我同意所有要求</label>
    </div>
    <div class="contact-info">
        <p>客服:LHTZ173@163.com</p>
    </div>
</body>

  • 10
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
### 回答1: 下面是一个简单的HTML登录界面代码: ``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>登录界面</title> </head> <body> <h1>登录</h1> <form action=""> <label for="username">用户名:</label> <input type="text" id="username" name="username"> <br><br> <label for="password">密码:</label> <input type="password" id="password" name="password"> <br><br> <input type="submit" value="登录"> </form> </body> </html> ``` 这是一个简单的登录界面,包含用户名和密码两个输入框,以及一个登录按钮。用户在输入用户名和密码后,可以点击登录按钮,完成登录操作。 ### 回答2: 生成一个HTML登录界面的步骤如下: 1. 创建一个HTML文件,并在文件中添加HTML的基本结构。例如: ```html <!DOCTYPE html> <html> <head> <title>Login</title> </head> <body> <!-- 在此处添加登录界面的内容 --> </body> </html> ``` 2. 在上面的`<body>`标签中添加登录界面的内容。一般来说,登录界面包括一个表单用于输入用户名和密码,以及一个提交按钮。例如: ```html <form> <label for="username">用户名:</label> <input type="text" id="username" name="username" required><br><br> <label for="password">密码:</label> <input type="password" id="password" name="password" required><br><br> <input type="submit" value="登录"> </form> ``` 在上面的例子中,我们使用了`<form>`标签创建一个表单,并在表单内添加了两个输入框分别用于输入用户名和密码。同时,每个输入框都使用了`required`属性,用于指定必须填写的项。最后,使用了一个提交按钮。 3. 可以通过添加CSS样式来美化登录界面。例如: ```html <style> form { width: 300px; margin: auto; padding: 20px; border: 1px solid black; border-radius: 5px; } label, input { display: block; margin-bottom: 10px; } input[type="submit"] { background-color: #4CAF50; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; } </style> ``` 上面的例子中,我们使用了内联CSS样式来设置表单的宽度、边框、圆角等属性,同时设置了提交按钮的背景颜色、边框等样式。 通过以上步骤可以生成一个简单的HTML登录界面,用户可以在输入框中输入用户名和密码,并点击提交按钮进行登录操作。 ### 回答3: 生成一个HTML登录界面可以通过以下步骤完成: 1. 创建一个新的HTML文件,并将文件后缀命名为.html。 2. 在文件中添加`<!DOCTYPE html>`标签来指定文档的类型。 3. 在`<html>`标签内添加`<head>`和`<body>`标签,分别用于定义文档的头部和主体内容。 4. 在`<head>`标签内添加`<title>`标签,用于设置登录界面的标题。例如:`<title>登录</title>`。 5. 在`<body>`标签内添加一个`<form>`标签,用于设置用户登录表单。 6. 在`<form>`标签中添加一个`<h2>`标签,用于显示标题或欢迎消息。例如:`<h2>欢迎登录</h2>`。 7. 在`<form>`标签内添加一个`<label>`标签和一个`<input>`标签,用于输入用户名。例如: ```html <label for="username">用户名:</label> <input type="text" id="username" name="username" required> ``` 8. 按照相同的方式,添加一个`<label>`标签和一个`<input>`标签,用于输入密码。例如: ```html <label for="password">密码:</label> <input type="password" id="password" name="password" required> ``` 9. 使用`<button>`标签来添加一个登录按钮。例如:`<button type="submit">登录</button>`。 10. 在`<form>`标签的结束处,添加一个`<div>`标签或`<p>`标签用于显示错误消息。例如: ```html <p id="error-msg"></p> ``` 11. 最后,使用CSS样式为登录界面添加样式,可以通过`<style>`标签添加CSS样式,也可以将CSS样式写在外部的CSS文件中并引入。 以上是生成一个简单的HTML登录界面的步骤,根据实际需求,你还可以添加更多的输入字段和其他功能。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值