一个简洁、美观的登录页面

一个简洁、美观的登录页面的实现

上手可以直接使用!

一、页面效果:

在这里插入图片描述

二、实现代码:

  • HTML
 <form action="" method="post">
        <div class="container">
            <div class="main-title">欢迎登录</div>

            <div class="main">
                <div class="in-con">
                    <input type="text" id="username" placeholder="请输入用户名" autofocus>
                    <i>U</i>
                </div>

                <div class="in-con">
                    <input type="password" id="password" placeholder="密码">
                    <i class="key">P</i>
                </div>

                <div class="in-con">
                    <input type="submit"  id="btn-login" class="btn-login" value="登 录">
                </div>

            </div>
        </div>

    </form>
  • CSS样式
<style>
        html,
        body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, #51499c, #24c6db);
        }

        .browser-happy {
            position: fixed;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            background: #54c4e5;
            z-index: 999;
            padding: 50px;
            text-align: center;
            color: #fff;
            font-size: 24px;
        }

        .container {
            width: 500px;
            margin: 0 auto;
            max-width: 100%;
            padding-top: 80px;
        }

        .container .main {
            border-radius: 5px;
            background: rgba(255, 255, 255, .08);
            box-sizing: border-box;
            padding: 50px 100px;
        }

        @media screen and (max-width: 640px) {
            .container .main {
                padding: 50px;
            }
        }

        .main-title {
            text-align: center;
            margin-bottom: 30px;
            color: #fff;
            font-size: 24px;
            -webkit-box-reflect: below 0 -webkit-linear-gradient(top, rgba(250, 250, 250, 0), rgba(250, 250, 250, .0) 30%, rgba(250, 250, 250, 0.3));
            box-reflect: below 0 -webkit-linear-gradient(top, rgba(250, 250, 250, 0), rgba(250, 250, 250, .0) 30%, rgba(250, 250, 250, 0.3));
        }

        .in-con {
            position: relative;
        }

        .in-forget {
            text-align: center;
            margin-top: 20px;
        }

        .in-forget a {
            color: #efefef;
            text-decoration: none;
            font-size: 12px;
        }

        .in-forget a:hover {
            color: #fff;
            text-decoration: underline
        }

        .in-con i {
            position: absolute;
            display: block;
            left: 14px;
            top: 13px;
            width: 14px;
            height: 14px;
            background: url('./images/login-icons.png') no-repeat;
            background-size: 100%;
            background-position: 0 1px;
            color: white;
        }

        .in-con i.key {
            background-position: 0 -28px;
            color: white;
        }

        .in-con input {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid #ccc;
            height: 40px;
            margin-bottom: 24px;
            border-radius: 40px;
            background: rgba(255, 255, 255, .08);
            color: #fff;
            outline: none;
            padding-left: 40px;
            font-size: 16px;
            transition: all .3s linear;
        }

        .in-con input:focus {
            color: #fff;
            border-color: #fff;
            background: rgba(255, 255, 255, .12);
        }

        .in-con input:focus+i {
            background-position: 0 -14px;
        }

        .in-con input:focus+i.key {
            background-position: 0 -42px;
        }

        input::-webkit-input-placeholder {
            color: #cfcfcf;
        }

        .in-con input:focus::-webkit-input-placeholder {
            color: #fff;
        }

        .in-con .btn-login {
            display: block;
            width: 100%;
            height: 40px;
            background: linear-gradient(to bottom, #e0f0f0, #a1e4f7);
            border-radius: 40px;
            line-height: 40px;
            text-align: center;
            color: #2daecf;
            text-decoration: none;
        }

        .in-con .btn-login:hover {
            background: linear-gradient(to bottom, #fff, #c2f2ff);
        }
        .in-con .btn-login{
            padding:  0 20px;
            font-size: 20px;
        }
    </style>
  • 6
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要设计一个简洁美观的Android个人界面,有几个关键方面需要考虑。 首先,布局应该简洁明了。可以采用卡片式的设计,将不同模块进行分块展示,并通过合理的空白布局和边框线条来提升界面整体美感。在布局的选择上,可以使用网格布局来展示不同的内容模块,或者采用简单的线性布局和约束布局等。 其次,颜色搭配要考虑到整体配色的统一性。选择少量的主题色,并在整个界面中运用,保持一致的调性。可以利用鲜明的主题色来引导用户的注意力,同时也可以利用同一色系或渐变色来提升界面的层次感。 第三,图标和文字应该简洁易懂。可以使用简约的图标设计来展示不同模块的功能,同时配以清晰明了的文字描述。图标的样式和大小要与整个界面相协调,并且要确保图标的可识别性和易操作性。 第四,字体的选择也很重要。要选择合适的字体,以确保在不影响可读性的情况下,符合整体界面的风格,一般来说,简洁风格的字体更加符合设计需求。 最后,界面的过渡和动画效果也是增加美感的重要因素。合理运用渐变、缩放、淡入淡出等动画效果,可以让界面更有活力,提升用户体验。 总的来说,设计一个简洁美观的Android个人界面需要从整体布局,颜色搭配,图标文字,字体选择和动画效果等多个方面进行设计和考虑,以提供用户良好的视觉体验。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值