炫酷的登录框!(附源码)

大家想看什么前端效果请留言

预览效果

源码

html 复制代码
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            margin-top: 200px;
            background-color: #212121;
        }

        .form {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 4em 5em 4em;
            background-color: #171717;
            border-radius: 20px;
        }

        #heading {
            text-align: center;
            margin: 2em;
            color: rgb(0, 255, 200);
            font-size: 1.2em;
        }

        .field {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5em;
            border-radius: 25px;
            padding: 0.6em;
            border: none;
            outline: none;
            color: white;
            background-color: #171717;
            box-shadow: inset 2px 5px 10px rgb(5, 5, 5);
        }

        .input-icon {
            height: 1.3em;
            width: 1.3em;
            fill: rgb(0, 255, 200);
        }

        .input-field {
            background: none;
            border: none;
            outline: none;
            width: 100%;
            color: rgb(0, 255, 200);
        }

        .form .btn {
            display: flex;
            justify-content: space-between;
            flex-direction: row;
            margin-top: 2.5em;
            gap: 12px;
        }
        .button1, .button2{
            flex: 1;
        }

        .button1, .button2, .button3 {
            padding: 0.5em;
            border-radius: 5px;
            border: none;
            outline: none;
            transition: .4s ease-in-out;
            background-image: linear-gradient(163deg, #00ff75 0%, #3700ff 100%);
            color: rgb(0, 0, 0);
        }

        .button1:hover, .button2:hover {
            background-image: linear-gradient(163deg, #00642f 0%, #13034b 100%);
            color: rgb(0, 255, 200);
        }

        .button3:hover {
            background-image: linear-gradient(163deg, #a00000fa 0%, #d10050 100%);
            color: rgb(255, 255, 255);
        }

        .card {
            background-image: linear-gradient(163deg, #00ff75 0%, #3700ff 100%);
            border-radius: 22px;
            transition: all .3s;
        }

        .card2 {
            border-radius: 0;
            transition: all .2s;
        }

        .card2:hover {
            transform: scale(0.98);
            border-radius: 20px;
        }

        .card:hover {
            box-shadow: 0px 0px 30px 1px rgba(0, 255, 117, 0.30);
        }
    </style>
</head>
<body>
    <div class="card">
        <div class="card2">
            <form class="form">
                <p id="heading">登录</p>
                <div class="field">

                    </svg>
                    <input type="text" class="input-field" placeholder="Username" autocomplete="off">
                </div>
                <div class="field">
                   
                    </svg>
                    <input type="password" class="input-field" placeholder="Password">
                </div>
                <div class="btn">
                    <button class="button1">登录</button>
                    <button class="button2">注册</button>
                </div>
                <button class="button3">忘记密码</button>
            </form>
        </div>
    </div>
</body>
</html>
相关推荐
xj75730653320 小时前
《python web开发 测试驱动方法》
开发语言·前端·python
IT=>小脑虎20 小时前
2026年 Vue3 零基础小白入门知识点【基础完整版 · 通俗易懂 条理清晰】
前端·vue.js·状态模式
IT_陈寒20 小时前
Python 3.12性能优化实战:5个让你的代码提速30%的新特性
前端·人工智能·后端
赛博切图仔20 小时前
「从零到一」我用 Node BFF 手撸一个 Vue3 SSR 项目(附源码)
前端·javascript·vue.js
爱写程序的小高20 小时前
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree
前端·npm·node.js
loonggg20 小时前
竖屏,其实是程序员的一个集体误解
前端·后端·程序员
程序员爱钓鱼20 小时前
Node.js 编程实战:测试与调试 - 单元测试与集成测试
前端·后端·node.js
码界奇点20 小时前
基于Vue.js与Element UI的后台管理系统设计与实现
前端·vue.js·ui·毕业设计·源代码管理
时光少年20 小时前
Android KeyEvent传递与焦点拦截
前端
踢球的打工仔21 小时前
typescript-引用和const常量
前端·javascript·typescript