zoukankan      html  css  js  c++  java
  • 【HTML】一个好看的登录界面

    效果图

     HTML:

    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=drive-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="login.css">
    <!-- font-awesome 图标字体 http://www.fontawesome.com.cn/faicons/#web-application -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" media="screen" rel="stylesheet" type="text/css">
    <title>Demo</title>
    </head>
        <div id="login-box">
            <h1>Login</h1>
            <div class="form">
                <div class="item">
                    <i class="fa fa-user-circle-o" aria-hidden="true"></i>
                    <input type="text" placeholder="Username">
                </div>
                <div class="item">
                    <i class="fa fa-key" aria-hidden="true"></i>
                    <input type="text" placeholder="Password">
                </div>
            </div>
            <button>Login</button>
        </div>
    <body>
    </body>
    </html>

    CSS:

    body{
        background: url('bj.jpg');
        background-repeat: no-repeat;
        background-size: 100% auto;
    }
    #login-box{
        width: 30%;
        height: auto;
        margin: 0 auto;
        margin-top: 15%;
        text-align: center;
        background: #00000060;
        padding: 20px 50px;
    }
    #login-box h1{
        color: #fff;
    }
    #login-box .form .item input{
        margin-top: 15px;
    }
    #login-box .form i{
        font-size: 18px;
        color: #fff;
    }
    #login-box .form .item input {
        width: 180px;
        font-size: 18px;
        border: 0;
        border-bottom: 2px solid#fff;
        padding: 5px 10px;
        background:#ffffff00;
        color: #fff;
    }
    #login-box button{
        margin-top: 15px;
        width: 180px;
        height: 30px;
        font-size: 20px;
        font-weight: 700;
        color: #fff;
        background:linear-gradient(to right,#f30909 0%,#4013e6e1 100%);
        border: 0;
        border-radius: 15px;
    }

    背景图:

  • 相关阅读:
    3月4日毕设进度
    3月3日毕设进度
    3月2日毕设进度
    3月1日毕设进度
    2月29日毕设进度
    2月28日毕设进度
    2月27日毕设进度
    进度报告七 (重大技术需求调研)
    进度报告六-(重大技术需求调研)
    进度报告五 (重大技术需求调研)
  • 原文地址:https://www.cnblogs.com/HGNET/p/12462894.html
Copyright © 2011-2022 走看看