登录注册页面

简单实现网站的登录,注册页面

一、登录界面
1、html
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="index.css" type="text/css">
</head>
<body>
<div class="container">
    <div class="welcome">
        <h1 class="person">用户登录</h1>
    <div class="index">
        <div class="login">
     <input type="text" class="text" placeholder="请输入用户名"><br>
     <input type="password" class="password" placeholder="输入密码"><br>
     <input type="button" class="button1" value="登录"><br>
     <a href="resign.html" target="_blank"><input type="button" class="button2" value="注册"></a><br>
            <span class="forge"><a href="forge.html" target="_blank">忘记密码</a></span>
        </div>
    </div>
    </div>
</div>
</body>
</html>									
2、css样式
.body{
     margin:0;
     padding:0;
 }
a{
    text-decoration: none;
}
a:hover{
    color:#6effef;
}
input{
    border:none;
    box-shadow: none;
    font-size:15px;
    color:#333333;
    outline: none;  /*鼠标点击是输入框颜色不发生改变*/
}

.text{
    height:40px;
    width:330px;
    border-radius: 10px;
}
.password{
    height:40px;
    width:330px;
    margin-top: 20px;
    border-radius: 10px;
}
.button1{
    height:40px;
    width:330px;
    background-color: #319aec;
    font-size:16px;
    margin-top:15px;
    border-radius: 10px;
    color:white;
}
.button1:hover{
    color:white;
   background-color: #286090;
}
.button2:hover{
    color:white;
    background-color: #286090;
}
.button2{
    height:40px;
    width:330px;
    background-color: #319aec;
    font-size:16px;
    margin-top:15px;
    /*margin-bottom: 100px;*/
    border-radius: 10px;
    color:white;
    display:block;
}
.container{
    background-image: url(img/photo.jpg);
    background-size: 1500px 750px;
    width:1500px;
    height:750px;
    border:1px black solid;
    /*background-repeat: no-repeat;*/
}
.index{
    /*margin-left:800px;*/
    /*margin-top: 200px;*/
    height:320px;
    width:400px;
    border-radius: 10px;
    box-shadow: 5px 5px 5px #888;
    background-color: #edeffb;
}
.login{
    margin-left:40px;
    padding-top:40px;
}
.forge{
    display:block;
    text-align: right;
    padding-right:25px;
}
.welcome{
    margin-top:200px;
    margin-left:800px;
}
.person{
    font-size: 30px;
    color:#ffffff;
    line-height: 1em;
    text-align: center;
    font-weight:500;
    margin-right:300px;
}
二、注册界面
1、html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="resign.css" type="text/css">
</head>
<body>
<div class="container">
    <div class="welcome">
        <h1 class="person">用户注册</h1>
        <div class="index">
            <div class="login">
                <input type="text" class="text" placeholder="手机号/QQ号/微信号"><br>
                <input type="password" class="password" placeholder="输入密码"><br>
                <input type="password" class="button1" placeholder="请确保两次输入密码一致"><br>
                <a href="" target="_blank"><input type="button" class="button2" value="注册"></a><br>
                <span class="forge"><a href="index.html" target="_blank">已有账号,直接登录</a></span>
            </div>
        </div>
    </div>
</div>
</body>
</html>
2、css样式
.body{
    margin:0;
    padding:0;
}
a{
    text-decoration: none;
}
a:hover{
    color:#6effef;
}
input{
    border:none;
    box-shadow: none;
    font-size:15px;
    color:#333333;
    outline: none;  /*鼠标点击是输入框颜色不发生改变*/
}

.text{
    height:40px;
    width:330px;
    border-radius: 10px;
}
.password{
    height:40px;
    width:330px;
    margin-top: 20px;
    border-radius: 10px;
}
.button1{
    height:40px;
    width:330px;
    margin-top: 20px;
    border-radius: 10px;
}
.button2:hover{
    color:white;
    background-color: #286090;
}
.button2{
    height:40px;
    width:330px;
    background-color: #319aec;
    font-size:16px;
    margin-top:15px;
    /*margin-bottom: 100px;*/
    border-radius: 10px;
    color:white;
    display:block;
}
.container{
    background-image: url(img/photo2.jpg);
    background-size: 1500px 750px;
    width:1500px;
    height:750px;
    border:1px black solid;
    /*background-repeat: no-repeat;*/
}
.index{
    /*margin-left:800px;*/
    /*margin-top: 200px;*/
    height:320px;
    width:400px;
    border-radius: 10px;
    box-shadow: 5px 5px 5px #888;
    background-color: #edeffb;
}
.login{
    margin-left:40px;
    padding-top:40px;
}
.forge{
    display:block;
    text-align: right;
    padding-right:25px;
}
.welcome{
    margin-top:200px;
    margin-left:800px;
}
.person{
    font-size: 30px;
    color:#ffffff;
    line-height: 1em;
    text-align: center;
    font-weight:500;
    margin-right:300px;
}
三、实现效果
1、登录界面

在这里插入图片描述

2、注册界面

在这里插入图片描述

四、最后

背景图片可以设置自己喜欢的哦~~~~

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值