html登录界面示例分享

 效果图

代码中不含背景图,图片片自己设置

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>登录</title>  
</head>
<script type="text/javascript">
    function checkEmail(node){
        var reg = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/i;
        if(reg.test(node.value))
        {
            node.style.color="#28ff28";
        }
        else
        {
            node.style.color="#ff2d2d";
        }
    }
    function checkPsw(node){
        var reg = /^(?!_)(?!.*?_$)[\w]{6,16}$/i;
        if(reg.test(node.value))
        {
            node.style.color="#28ff28";
        }
        else
        {
            node.style.color="#ff2d2d";
        }
    }
    function confirm(){
    }
</script>
<style>
    * {
    padding:0;
    text-decoration:none;
    list-style:none;
    box-sizing:border-box;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
}
body {
    font-family:宋体;
}
.Login_wrapper{
    margin:auto;
    margin-top:100px;
    width: 400px;
    height:400px;
    background-color: #d3d8e4;
    color: #000;
    border-radius: 200px;
    padding: 20px;
    opacity: 0.8;
    animation-name: div;
    animation-duration: 2s;
    animation-iteration-count: 1;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}

.Login_wrapper .header{
    text-align: center;
    margin-top: 20px;
    font-size: 30px;
    text-transform: uppercase;
    height:20px;
}

.Login_wrapper .input_wrapper{
    margin-top: 20px;
    padding-top: 20px;
}

.Login_wrapper .input_wrapper input{
    background-color: #2f3542;
    border: 0;
    width: 100%;
    text-align: center;
    font-size: 15px;
    color: #fff;
    outline: none;
    text-transform: uppercase;
}

.Login_wrapper .input_wrapper input::-webkit-input-placeholder{
    color: #fff;
    font-size: 15px;
}

.Login_wrapper .input_wrapper .broder_wrapper{
    margin:0 auto;
    background-image: linear-gradient(to right,#e8198b,#0eb4dd);
    width: 230px;
    height: 40px;
    margin-bottom: 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Login_wrapper .input_wrapper .broder_wrapper .broder_item{
    height: calc(100% - 4px);
    width: calc(100% - 4px);
    border-radius: 30px;
}

.Login_wrapper .active{
    display: flex;
    justify-content: center;
}

.Login_wrapper .active .btn{
    width: 80px;
    height:30px;
    margin-top: 30px;
    text-transform: uppercase;
    border: 2px solid #1e90ff;
    background-color:#7b7b7b;
    color:#fcfcfc;
    text-align: center;
    border-radius: 30px;
    cursor: pointer;
    transition: .2s;
}

.Login_wrapper .active .btn:hover{
    background-color: #0080ff;
}

.Login_wrapper .link{
    text-align: center;
    margin-top: 10px;
    font-size: 10px;
    text-transform: uppercase;
    height:20px;
}

.Login_wrapper .link a{
    color: #000;
}

#Login_wrappe_left{
    margin:0,0,0,0;
    padding-left: 20px;
    width:150px;
    height:50px;
    margin-top:20px;
    float:left;
}

#Login_wrappe_right{
    text-align:end;
    padding-right: 20px;
    margin:0,0,0,0;
    width:150px;
    height:50px;
    margin-top:20px;
    float:right;
}

#Login_wrappe_left a{
    color:#000;
    margin-left: 50px;
    padding:3px 5px;
    border-radius:3px;
    font-size: 20px;
    text-transform:uppercase;
}

#Login_wrappe_right a{
    color:#000;
    margin-right: 50px;
    padding:3px 5px;
    border-radius:3px;
    font-size: 20px;
    text-transform:uppercase;
}
@keyframes div {
        0%{transform: translate(0px,0px);}
        50%{transform:rotateY(180deg)}
        100%{transform:rotateY(360deg)}
    }
</style>
<body>
    <form id="form1" runat="server" onsubmit="return false">
    <div class="Login_wrapper" id="Login_wrapper">
        <div class="header">登录</div>
        <div class="input_wrapper">
            <input type="text" class="broder_wrapper"  placeholder="邮箱" onblur="checkEmail(this)">
            <input type="password" class="broder_wrapper"  placeholder="密码:至少6位" onblur="checkPsw(this)">
        </div>
        <div class="active">
            <button class="btn" OnClick="confirm()">登录</button>
        </div>
        <div class="link">
            <a href="RegisterPage.html">忘记密码?</a>
        </div>
        <div id="Login_wrappe_left">
            <a href="RegisterPage.html">注册</a>
        </div>
        <div id="Login_wrappe_right">
            <a href="javascript:void();" onclick="parent.location.reload();">退出</a>
        </div>
    </div>
    </form>
</body>
</html>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值