登录界面(flex布局练习)

练习:登录界面在我们网页制作的过程中经常遇见,所以请你编写一个界面联系一下,这个可以增加一些动画或者是其他的效果,当然越帅越好。请使用flex或者其他布局练习

例如:

代码

html 复制代码
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html {
            font-size: 14px;
        }

        body {
            width: 100%;
            height: 518px;
            background: url('./20200412133845_17432.jpg') no-repeat;
            background-size: cover;
        }
        .contain{
            width: 99%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .content{
            display: flex;
            flex-direction: column;
            text-align: center;
            width: 400px;
            height: 300px;
            background-color: transparent;
            border-radius: 10px;
            box-shadow: 0 0 30px 20px rgba(0, 0, 0, .6);
        }
        .logo{
            flex:1;
        }
        .input{
            display: flex;
            flex-direction: column;
            flex:4;
        }
        .inputusername{
            flex:1;
        }
        .inputpasswd{
            flex:1;
        }
        .button{
            flex:1;
        }
        button{
            width: 200px;
            height: 40px;
            font-size: 18px;
            background-color: transparent;
            border:none;
            box-shadow: 0 0 10px 10px rgba(10, 163, 209, 0.4);
            border-radius: 5px;
            transition: all .5s;
        }
        button:hover{
            background-color: #ccc;
        }
        input{
            outline: none;
            border-radius: 5px;
            border:none;
            width: 250px;
            height: 40px;
            background-color:#cccc;
            padding-left: 10px;
            color:white;
        }
        span{
            color:#ccc;
            font-size: 20px;
        }
    </style>
</head>

<body>
    <div class="contain">
        <div class="content">
            <div class="logo">
                <h1>
                    登录
                </h1>
            </div>
            <div class="input">
                <div class="inputusername">
                    <span>账号</span>
                    <input type="text" placeholder="请输入账号">
                </div>
                <div class="inputpasswd">
                    <span>密码</span>
                    <input type="text" placeholder="请输入密码">
                </div>
                <div class="button">
                    <button>登录</button>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
相关推荐
熊猫钓鱼>_>8 分钟前
Electron:当 Web 技术统治桌面
大数据·前端·javascript·人工智能·架构·electron·agent
德福危险9 分钟前
从盲打xss到到模板注入:unix靶机渗透之Tempus_fugit4
前端·unix·xss
JavaGuide11 分钟前
又一个画图 Skill 开源,再见手动画 draw.io!
前端·后端·github
一只猫的梦43 分钟前
AI 适配器架构
前端·chrome
谭光志1 小时前
AI 是怎么操作浏览器的——browser use 实现原理
前端·javascript·ai编程
weixin_471383031 小时前
args,...args与Parameters<T>
开发语言·前端
一tiao咸鱼2 小时前
前端转 agent # 03 - Pydantic v2 数据校验深入
前端·后端
Cobyte2 小时前
23.Vue Vapor 组件 attrs 的实现
前端·javascript·vue.js
前端H2 小时前
生成式 UI 实战:AI 如何重塑前端界面
前端·人工智能·ui
懂懂tty2 小时前
Web前端性能指标
前端