登录界面(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 小时前
C#:空合并运算符
java·前端·数据库
小羊没烦恼!9 小时前
铁道部新客票系统设计(二)
开发语言·前端·数据库·python·oracle·c#·php
燕落南枝10 小时前
CSS 学习:类型选择器与 AI 注释实战
css·人工智能·学习
智能直播11 小时前
RK3518:1.5G 内存 + 8G 存储,如何跑起硬件编解码、Web、AI 识别、绿幕特效
前端·人工智能·5g
掘金酱13 小时前
【10.24 特别活动】AI 时代,程序员的新饭碗在哪里?
前端·人工智能·后端
excel13 小时前
多进程环境下使用 PM2 部署 Socket.IO:需要注意什么
前端
IT_陈寒13 小时前
Redis的原子性竟然失效了?记一次分布式锁翻车实录
前端·人工智能·后端
时间的情敌15 小时前
《回顾 2018 前端:Vue2 成熟期,Webpack4 发布,PWA 大火》
前端
Java后端的Ai之路15 小时前
前端技术Vue-09-webpack-vuejs-实战
前端·vue.js·webpack
LMT流氓兔15 小时前
第五单元——第4课:给工具参数加校验
java·前端·算法·ai·langchain