• CSS 线条流转 login


    DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Titletitle>
        <style>
            *{
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
            body{
                display: flex;
                /*flex-direction: column;*/
                justify-content: center;
                align-items: center;
                min-height: 100px;
                height: 720px;
                background: #23242a;
            }
            .box{
                position: relative;
                width: 380px;
                height: 420px;
                /*margin-top: 100px;;*/
                background: #1c1c1c;
                border-radius: 8px;
                overflow: hidden;
            }
            .box::before{
                content: "";
                position: absolute;
                top: -50%;
                left: -50%;
                width: 380px;
                height: 420px;
                transform-origin: bottom right;
                background: linear-gradient(0deg, transparent,#45f3ff,#45f3ff);
                animation: animate 6s linear infinite;
            }
            .box::after{
                content: "";
                position: absolute;
                top: -50%;
                left: -50%;
                width: 380px;
                height: 420px;
                transform-origin: bottom right;
                background: linear-gradient(0deg, transparent,#45f3ff,#45f3ff);
                animation: animate 6s linear infinite;
                animation-delay: -3s;
            }
            @keyframes animate {
                0%{
                    transform: rotate(0deg);
                }
                100%{
                    transform: rotate(360deg);
                }
            }
            .form{
                position: absolute;
                inset: 2px;
                background: #28292d;
                border-radius: 8px;
                padding: 50px 40px;
                z-index: 10;
                display: flex;
                flex-direction: column;
            }
            .inputBox{
                position: relative;
                width: 300px;
                margin-top: 35px;
            }
            .form h2{
                color: #45f3ff;
                font-weight: 500;
                text-align: center;
                letter-spacing: 0.1em;
            }
            .inputBox input{
                position: relative;
                width: 300px;
                padding: 20px 10px 10px;
                background: transparent;
                border: none;
                outline: crimson;
                color: #23242a;
                font-size: 1em;
                z-index: 10;
                letter-spacing: 0.05em;
            }
            .inputBox span{
                position: absolute;
                left: 0;
                padding: 20px 0 10px;
                font-size: 1em;
                color: #8f8f8f;
                pointer-events: none;
                letter-spacing: 0.05em;
                transition: 0.5s;
            }
            .inputBox input:valid ~ span,
            .inputBox input:focus ~ span
            {
                color: #45f3ff;
                transform: translateX(0px) translateY(-34px);
                font-size: 0.75em;
            }
            .inputBox i{
                position: absolute;
                left: 0;
                bottom: 0;
                width: 100%;
                height: 2px;
                background: #45f3ff;
                border-radius: 4px;
                transition: 0.5s;
                pointer-events: none;
                z-index: 9;
            }
            .inputBox input:valid ~ i,
            .inputBox input:focus ~ i{
                height: 44px;
            }
            .links{
                display: flex;
                justify-content: space-between;
            }
            .links a{
                margin: 10px 0;
                font-size: 0.75em;
                color: #8f8f8f;
                text-decoration: none;
            }
            .links a:hover,
            .links a:nth-child(2){
                color: #45f3ff;
            }
            input[type="submit"] {
                border: none;
                outline: none;
                background: #45f3ff;
                padding: 11px 35px;
                width: 100px;
                margin-top: 10px;
                border-radius: 4px;
                font-weight: 600;
                cursor: pointer;
            }
        style>
    
        script>
    head>
    <body>
    <div class="box">
        <div class="form">
            <h2>Sign inh2>
            <div class="inputBox">
                <input type="text" required="required">
                <span>Usernamespan>
                <i>i>
            div>
            <div class="inputBox">
                <input type="password" required>
                <span>Passwordspan>
                <i>i>
            div>
            <div class="links">
                <a href="#">Forgot Passworda>
                <a href="#">Sign upa>
            div>
            <input type="submit" value="login">input>
        div>
    div>
    body>
    html>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178

    在这里插入图片描述

  • 相关阅读:
    Linux 下配置 hosts 并设置免密登录
    QStringLiteral(str)
    第二章:并行硬件和并行软件
    【贝叶斯分类4】贝叶斯网
    【JS】前端文件读取FileReader操作总结
    LIO-SAM 详读代码笔记 -- 3.imageProjection
    安卓的ATV系统
    有一个班,3个学生,各学4门课,计算总平均分,以及第n个学生的成绩
    机器视觉中的工业光源选择技巧
    智能制造行业的工控安全解决方案
  • 原文地址:https://blog.csdn.net/weixin_43229819/article/details/127351361