登录界面(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>
相关推荐
如此这般英俊3 分钟前
手搓Claude Code-第十三章 background_tasks
前端·人工智能·chrome·python·算法·语言模型·自然语言处理
人间凡尔赛5 分钟前
Angular 20 告别 Zone.js:Zoneless 无 Zone 时代正式开启,Signals 驱动的响应式新范式(附完整代码)
前端·angular
雪芽蓝域zzs8 分钟前
(五)Vue3 管理后台:权限控制原理 + 完整流程梳理
前端
meilindehuzi_a9 分钟前
React JWT 登录鉴权实战:从无状态 HTTP 到路由守卫、Zustand 与 Axios 拦截器
前端·react.js·http
爱酱丶19 分钟前
VS Code 快速生成Vue3 + TypeScript + Setup 基础空模板
前端·javascript·typescript
Maxkim22 分钟前
在 GitHub 仓库里配一个 AI Code Reviewer,自动审查 PR
前端·javascript
忆江南22 分钟前
Flutter 图片库与 Dio 库优化实战指南
前端
用户9210802628623 分钟前
AI 对话为什么需要 Markdown 解析器:从纯文本气泡到专业内容渲染
前端
NeverSettle_27 分钟前
Agent 如何快速调用公司接口?——CLI + Skill 实践与踩坑
前端·javascript·后端
环境栈笔记31 分钟前
指纹浏览器怎么用:从 Profile、代理到环境检测的完整上手流程
前端·人工智能·后端·自动化