一个好看的登录html

一个好看的登录界面

直接上前端代码

html

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh"><head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" type="text/css" href="../webFile/css/loginStyle.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mdui@1.0.2/dist/css/mdui.min.css" />
</head>
<body>

<div class="main" id="login_main" style="">
    <div class="login mdui-hoverable">
        <div class="account">
            <form class="loginform" method="post" action="请求路径">
                <div class="rlogo">登录</div>
                <div class="line"><input class="inputtxt" value="" name="username" placeholder="账号" type="text"></div>
                <div class="line"><input class="inputtxt" name="userpassword" value=""  placeholder="密码" type="password"></div>
                <div class="login_btn">
                    <button id="login-button" class="mdui-btn mdui-btn-raised mdui-ripple" type="submit">登录</button>
                    <button class="mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme-accent">注册</button></div>
                <a class="resetpw" href="#" target="_blank">忘记密码?</a>
            </form>
        </div>
    </div>
</div>
<script src="https://cdn.jsdelivr.net/npm/mdui@1.0.2/dist/js/mdui.min.js"></script>

</body></html>

css

body {
    background-color: #444;
    font-family: 华文黑体,"Microsoft YaHei",微软雅黑,STHei,"Helvetica Neue",Helvetica,Arial,sans-serif;
}
body {
    display: block;
    margin: 8px;
    background-color: #00dcff;
    background-image: linear-gradient(white, #3e363894);
}
div {
     display: block;
 }
form {
    display: block;
    margin-top: 0em;
}
.main .login {
    background-color: #fff;
    border-radius: 4px;
    height: 290px;
    left: 50%;
    margin-left: -220px;
    margin-top: -180px;
    padding: 35px 40px 50px;
    position: absolute;
    top: 50%;
    width: 360px;
}
.main .login .rlogo {
    text-align: center;
    font-size: 26px;
    color: #444;
    cursor: pointer;
    height: 40px;
    margin-bottom: 40px;
    overflow: hidden;
}
.main .login .line {
    height: 42px;
    margin-bottom: 20px;
    line-height: 42px;
    position: relative;
}
.main .login .line .inputtxt {
    background: transparent;
    float: left;
    width: 360px;
    height: 30px;
    line-height: 30px;
    border: #d1d1d1 1px solid;
    padding: 5px 10px;
    position: relative;
    z-index: 1;
    box-shadow: 0 3px 5px -4px rgb(0 0 0 /40%) inset, -1px 0 3px -2px rgb(0 0 0 / 10%) inset;
    border-radius: 3px;
}
input {
    -webkit-appearance: none;
}
.Validform_checktip {
    color: #999;
    font-size: 12px;
    height: 24px;
    line-height: 24px;
    overflow: hidden;
    padding: 0 6px;
    position: absolute;
    right: 10px;
    text-align: right;
    top: 14px;
    z-index: 1;
}
.login_btn input {
    width: 100%;
    height: 44px;
    background: linear-gradient(#abfffb,#1b81ff);
    box-shadow: inset 0 1px 2px #fdfdfd;
    text-shadow: #e7ede8 0 -1px 0;
    border: 1px solid #205ba5;
    text-align: center;
    font-size: 16px;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
}
.returnpw, .phonelogin, .resetpw {
    text-decoration: none;
    bottom: 20px;
    color: #2061a5;
    position: absolute;
    left: 40px;
}
a:-webkit-any-link {
    color: -webkit-link;
    cursor: pointer;
    text-decoration: none;
}

预览图

总体

image

悬停

image
image

posted @ 2021-12-18 13:49  MD&One-AR  阅读(344)  评论(0)    收藏  举报