网页的登录和注册页面

注册页面

代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册页面</title>
    <style>
        .p{
            color:red;
            margin-left:20px;
            display:inline-block;
        }
        .c{
            color:red;
            margin-left:4px;
            display:inline-block;
        }
        .l{
            font-size:18px;
        }
        .d{
            height:35px;
            width:300px;
            display:inline;
        }
        .i{
            height:30px;
            width:300px;
        }
       
             .container 
        {
            width: 70%;
            margin: 10% auto 0;
            background-color: #f0f0f0;
            padding: 2% 5%;
            border-radius: 10px;

            position: absolute;
            top: 50%;
            left: 50%;
            width: 100px;
            height: 500px;
            transform: translate(-50%, -50%);

        }

    </style>
</head>
<body>
    <div style="height: 80px;"></div>
    <form enctype="multipart/form-data">
        <div style="width:500px;float:left;margin:0 20px;" class="container">
            <div style="font-size:28px;">注册新用户</div>
            <br/>
            <span class="p">*</span>
            <label for="username" class="l">用户名:</label>
            <div style="height:35px;width:300px;position:relative;display:inline;">
                <input id="username" type="text" style="height:30px;width:250px;padding-right:50px;">
                <span style="position:absolute;right:18px;top:2px;background-image:url(user.ico);height:16px;width:16px;display:inline-block;" ></span>
            </div>
            <br/><br/>
            <span class="p">*</span>
            <label for="phonenumber" class="l">手机号:</label>
            <div  class="d">
                <input id="phonenumber" type="text" class="i">
            </div>
            <br/><br/>
            <span class="c">*</span>
            <label for="login_password" class="l">登录密码:</label>
            <div  class="d">
                <input id="login_password" type="text" class="i">
            </div>
            <br/><br/>
            <span class="c">*</span>
            <label for="confirm_password" class="l">确认密码:</label>
            <div  class="d">
                <input id="confirm_password" type="text" class="i">
            </div>
            <br/><br/>
            <span class="p">*</span>
            <label for="ver_code" class="l">验证码:</label>
            <div  class="d">
                <input id="ver_code" type="text" class="i">
            </div>
            <br/><br/>
            <input type="checkbox" name="agree" style="margin-left:100px;display:inline-block;" value="1"/>
            <span style="font-size:10px;">我已阅读并同意《用户注册协议》</span>
            <br/><br/>
            <input type="submit" value="同意以上协议并注册" style="margin-left:100px;height:30px;width:300px;display:inline-block;"/>
        </div>
    </form>

</body>
</html>

效果:
在这里插入图片描述

登录页面

代码:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
            <title>
                登录页面
            </title>
        </meta>
        <style>
             .container 
        {
            width: 70%;
            margin: 10% auto 0;
            background-color: #f0f0f0;
            padding: 2% 5%;
            border-radius: 10px
        }
        h1{
            text-align: center;
        }
        </style>
    </head>
    <body>
        <div style="height:80px;"></div>
        <div style="width:500px;float: middle;margin:0 auto;" class="container">
            <h1>登录</h1>
            <label for="username" style="font-size:18px">
                用户名:
            </label>
            <div style="height:35px;width:400px;position:relative;display:inline">
                <input id="username" style="height:30px;width:350px;padding-right:50px;" type="text">
                    <span style="position:absolute;right:18px;top:2px;background-image:url(user.ico);height:16px;width:16px;display:inline-block;">
                    </span>
                    
                </input>
            </div>
            <br/>
            <br/>
            <label for="password1" style="font-size:18px">
                密码:
            </label>
            <div style="height:35px;width:400px;position:relative;display:inline">
               
                <input id="password1" style="height:30px;width:350px;padding-right:50px;" type="text">
                    <span style="position:absolute;right:16px;top:2px;background-image:url(p.ico);height:16px;width:16px;display:inline-block;">
                    </span>
                    
                </input>
            </div>
            <br>
            <br>
                <div style="width:426px;float: middle;">
                    <input name="auto_login" type="radio" value="1"/>
                    自动登录
                    <a herf="找回密码网址">
                        忘记密码?
                    </a>
                    <a href="http://111.229.210.226/04.html">
                        注册
                    </a>
                </div>
                <br/>
                <br/>
                <div style="width:426px">
                    <a href="http://111.229.210.226/02.html"><input style="height:30px;width:200px;" type="submit" value="登录"/></a>
                </div>
            </input>
        </div>
    </body>
</html>

效果:
在这里插入图片描述

  • 3
    点赞
  • 42
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值