登录界面(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>
相关推荐
崔庆才丨静觅6 小时前
hCaptcha 验证码图像识别 API 对接教程
前端
passerby60617 小时前
完成前端时间处理的另一块版图
前端·github·web components
掘了7 小时前
「2025 年终总结」在所有失去的人中,我最怀念我自己
前端·后端·年终总结
崔庆才丨静觅7 小时前
实用免费的 Short URL 短链接 API 对接说明
前端
崔庆才丨静觅8 小时前
5分钟快速搭建 AI 平台并用它赚钱!
前端
崔庆才丨静觅8 小时前
比官方便宜一半以上!Midjourney API 申请及使用
前端
Moment8 小时前
富文本编辑器在 AI 时代为什么这么受欢迎
前端·javascript·后端
崔庆才丨静觅8 小时前
刷屏全网的“nano-banana”API接入指南!0.1元/张量产高清创意图,开发者必藏
前端
剪刀石头布啊8 小时前
jwt介绍
前端
爱敲代码的小鱼8 小时前
AJAX(异步交互的技术来实现从服务端中获取数据):
前端·javascript·ajax