Blogger Information
Blog 1
fans 0
comment 0
visits 995
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html&css基础知识(input标签的使用及基本布局)-2019年3月12日20时
Leslie的博客
Original
1000 people have browsed it

1、本次登录框的实现运用了定位及外边距对整体位置进行控制,然后用input的各种形式分别实现账号、密码输入及复选框,用a标签实现了链接跳转。

2、主要代码

<!doctype html>

<html>

    <head>

        <meta charset="UTF-8">

       <title>登录框</title>

      <style>

             body,input{margin: 0;padding: 0;}

            body{background-color: #666;}

            *{box-sizing:border-box;}

            a{text-decoration: none;}

             .login-box{width: 400px;height: 300px;position: absolute;left: 50%;top: 50%;text-align: center;margin-left:                 -200px;margin-top: -150px;border-radius: 7px;background-color: #E5E5E8;}

            .img-box img{width: 100px;border-radius: 50%;margin-top: 10px;}

            .input-box{width: 300px;height: 30px;border: none;padding-left: 6px;border-radius: 5px;}

            .user{margin-top: 10px;}

            .pwd{margin-top: 8px;}

            .tips{width: 300px;color: #757575;font-size: 14px;margin-top: 15px;display: inline-block;}

            .check-box{float: left;}

            .forget-pwd{color: #757575;float: right;}

            .forget-pwd:hover{text-decoration: underline;}

            .login-btn{width: 300px;height: 40px;background: linear-gradient(#5353DF,#5252B9,#7171C1);color:                           #fff;border: none;cursor: pointer;font-size: 18px;margin-top: 15px;border-radius: 5px;}

            .login-btn:hover{background:rgba(57,57,198,.8);}

       </style>

    </head>

<body>

    <div class="login-box">

        <div class="img-box">

            <img src="images/header-pic.png" alt="header-pic">

        </div>

        <form action="url" method="get">

            <input type="text" class="input-box user" name="user" placeholder="请输入账号"><br>

            <input type="password" class="input-box pwd" name="pwd" placeholder="请输入密码"><br>

        </form>

        <div class="tips">

            <label class="check-box">

                <input type="checkbox" checked value="自动登录">&nbsp;自动登录

            </label>

            <a href="##">忘记密码?</a>

          </div>

            <button>登 录</button>

    </div>

</body>

</html>


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments