查看: 332|回复: 0

[其他语言] 一个蛮好看的前端html登录页面

[复制链接]

0

技术

0

魅力

0

原创

青出于蓝

Rank: 5Rank: 5

积分
3705
人气
21
分享
3
发表于 2023-9-21 00:24:32 | 显示全部楼层 |阅读模式
本帖最后由 小永高吖 于 2023-9-21 10:23 编辑

以前忘了从哪个源码分享站拿的代码,偶然发现自己修改了下感觉蛮好看的,给各位分享一下

需要自行对接你站点登录验证的后端,否则只是个空壳页面

展示页:https://download.kstore.space/download/5005/yanshi/login.html

源码

[HTML] 纯文本查看 复制代码
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录本站</title>
<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 10px;
}
html::before {
    content: '';
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: -1;
}
::selection {
    color: #fff;
    background-color: rgb(144,129,241);
}
.box {
    display: flex;
    overflow: hidden;
    width: 90rem;
    height: 55rem;
    background-color: rgba(255,255,255,70%);
    border-radius: 1.5rem;
    margin: 10% auto;
    box-shadow: 0 0 1rem 0.2rem rgb(0 0 0 / 10%);
}
.box .left {
    position: relative;
    width: 35%;
    height: 100%;
}
.box .left::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(https://xiaoyonggaoya.pages.dev/login/login-tp.png);
    background-size: cover;
}
.box .right {
    display: flex;
    width: 65%;
    flex-direction: column;
    align-items: center;
}
.box .right h2{
    color: rgb(144,129,241);
    font-size: 3rem;
    margin-top: 5rem;
}
.box .right form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.box .right form .acc {
    outline: none;
    width: 80%;
    height: 5rem;
    font-size: 1.6rem;
    margin-top: 5rem;
    padding: 1rem 0 0 1.6rem;
    border: none;
    border-bottom:1px solid rgb(144,129,241) ;
    color: rgb(144,129,241);
    background-color: rgba(0,0,0,0);
}
.right form .acc:focus {
    outline: none;
    color: rgb(144,129,241);
    padding: 1rem 0 0 1.6rem;
}
.right .submit {
    width: 60%;
    height: 5rem;
    color: #f6f6f6;
    background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
    font-size: 1.4rem;
    border: none;
    border-radius: 0.5rem;
    margin: 6rem 0 0 50%;
    transform: translateX(-50%);
}
.right .submit:hover {
    box-shadow: 0 0 2rem -0.5rem rgb(0 0 0 / 15%);
}
.right .fn {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    width: 70%;
}
.right .fn font {
    font-size: 1.3rem;
    margin-top: 5rem;
    padding: 1rem 2rem;
    color: #666;
}
.right .fn font:hover {
    color: rgb(144,129,241);
}
</style>
<script>
function meshinaxidadedog(){
alert("账号登录成功!");}
function kleeworldfirstcute(){
alert("抱歉,注册功能还未开放!");}
function yoimiyadedidudiduzbc(){
alert("抱歉,找回密码功能还未开放");}
</script>
<link rel="icon" href="https://xiaoyonggaoya.pages.dev/live/img/icon.jpg">
</head>
<body background="https://xiaoyonggaoya.pages.dev/login/bg.jpg" style="overflow:hidden;background-repeat:no-repeat;background-size:100%100%;background-attachment:fixed;">
<div class="box">
<div class="left"></div>
<div class="right">
<h2>登 录</h2>
<form action="">
<input class="acc" type="text" placeholder="用户名">
<input class="acc" type="password" placeholder="密码">
<input class="submit" type="submit" value="登录账号" onclick="meshinaxidadedog()">
</form>
<div class="fn">
<font onclick="yoimiyadedidudiduzbc()">找回密码</font>
<font onclick="kleeworldfirstcute()">注册账户</font>
</div></div></div>
</body>
</html>
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表