登录界面(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>
相关推荐
奇迹_h3 分钟前
打造你的HTML5打地鼠游戏:零基础入门实践
前端
SuperEugene5 分钟前
Vue生态精选篇:Element Plus 的“企业后台常用组件”用法扫盲
前端·vue.js·面试
Neptune19 分钟前
JavaScript回归基本功之---类型判断--typeof篇
前端·javascript·面试
贾铭9 分钟前
如何实现一个网页版的剪映(三)使用fabric.js绘制时间轴
前端·后端
子兮曰1 小时前
后端字段又改了?我撸了一个 BFF 数据适配器,从此再也不怕接口“屎山”!
前端·javascript·架构
万少3 小时前
使用Trae轻松安装openclaw的教程-附带免费token
前端·openai·ai编程
浪浪山_大橙子4 小时前
OpenClaw 十分钟快速,安装与接入完全指南 - 推荐使用trae 官方 skills 安装
前端·人工智能
忆江南4 小时前
iOS 可视化埋点与无痕埋点详解
前端
离开地球表面_994 小时前
金三银四程序员跳槽指南:从简历到面试再到 Offer 的全流程准备
前端·后端·面试
_柳青杨4 小时前
跨域获取 iframe 选中文本?自己写个代理中间层,再也不求后端!
前端