帐号注册和用户登录

Posted 呛水de鱼

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了帐号注册和用户登录相关的知识,希望对你有一定的参考价值。

一、帐号注册:

效果图:

代码:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>帐号注册</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            /*border: 1px dashed red;*/
        }
        h1{
            margin-left: 150px;
            margin-bottom: 30px;
            width: 150px;
        }
        div{
            width: 460px;
            margin: 50px auto;
        }
        div input{
            width: 430px;
            height: 60px;
            font-size: 20px;
            padding-left: 20px;
            margin-bottom: 20px;
        }
        div input:nth-of-type(2){
            width: 280px;
            float: left;
        }
        div input:nth-of-type(3){
            width: 150px;
            height: 64px;
            float: left;
            background-color: black;
            color: white;
            padding-left: 0;
            font-weight: 900;
            border-style: none;
        }
        div p{
            width: 450px;
            height: 30px;
            line-height: 30px;
            font-size: 20px;
            margin-bottom: 20px;
            color: red;
        }
        div input:nth-of-type(6){
            width: 453px;
            height: 60px;
            line-height: 60px;
            font-size: 20px;
            color: white;
            font-weight: 900;
            background-color: red;
            border-style: none;
        }
    </style>
</head>
<body>
<div>
    <h1>帐号注册</h1>
    <form method="post" action="#">
        <input type="text" required placeholder="手机号"/>
        <input type="text" required placeholder="验证码"/>
        <input type="button" value="获取验证码"/>
        <input type="password" required placeholder="设置密码"/>
        <input type="password" required placeholder="确认密码"/>
        <p>点击注册,表示同意《服务协议》</p>
        <input type="submit" value="同意协议并注册"/>
    </form>
</div>

</body>
</html>

二、用户登录:

效果图:

代码:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>用户登录</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            /*border: 1px dashed red;*/
        }
        h1{
            margin-left: 150px;
            margin-bottom: 30px;
            width: 150px;
        }
        div{
            width: 460px;
            margin: 50px auto;
            position: relative;
        }
        div input:nth-of-type(1) {
            border-style: none;
            border: 1px solid #999999;
            width: 400px;
            height: 60px;
            font-size: 20px;
            padding-left: 50px;
            margin-bottom: 20px;
            background: url("image/i_u.png") 10px 10px no-repeat;
            background-size: 30px;
        }
        div input:nth-of-type(2){
            border-style: none;
            border: 1px solid #999999;
            width: 400px;
            height: 60px;
            font-size: 20px;
            padding-left: 50px;
            margin-bottom: 20px;
            background: url("image/i_pwd.png") 10px 10px no-repeat;
            background-size: 30px;
        }
        div input:nth-of-type(3){
            height: 17px;
            width: 17px;
            margin-left: 20px;
        }
        div span{
            display: inline-block;
            font-size: 20px;
            color: #999999;

        }
        div span:nth-of-type(2){
            position: absolute;
            right: 10px;
        }
        div input:nth-of-type(4){
            border-style: none;
            color: white;
            background-color: red;
            font-weight: 900;
            width: 450px;
            height: 60px;
            font-size: 20px;
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div>
        <form method="post" action="#">
            <h1>用户登录</h1>
            <input type="text" required placeholder="邮箱/手机/用户名"/>
            <input type="text" required placeholder="密码"/>
            <input type="checkbox" value="auto_login"/><span>自动登录</span>
            <span>忘记密码?</span>
            <input type="submit" value="登录 "/>
        </form>
    </div>
</body>
</html>

 

以上是关于帐号注册和用户登录的主要内容,如果未能解决你的问题,请参考以下文章

单机传奇求帮助注册帐号一点确定就会断开连接,因为我下载的版本自带登录器太老无法使用,我就去下载了H

php header头如何添加Authorization登录验证?

登陆界面代码

Insights直播华为帐号服务,打造全场景安全帐号体系

Insights直播华为帐号服务,打造全场景安全帐号体系

ThinkPHP 3.2 用户注册邮箱验证激活帐号