当前位置: 代码网 > it编程>网页制作>html5 > html5登录玻璃界面特效

html5登录玻璃界面特效

2023年12月12日 html5 我要评论
html5登录玻璃界面特效本文主要介绍了html5登录玻璃界面特效,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 23-12-12

本文主要介绍了html5登录玻璃界面特效,废话不多说,具体如下:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="x-ua-compatible" content="ie=edge"></meta>
    <title>document</title>
    <style>
        html,
        body {
            margin: 0;
            padding: 0;
            font-family: "pingfang sc", "microsoft yahei", sans-serif;
        }
        .container {
            width: 100vw;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: url("https://tse3-mm.cn.bing.net/th/id/oip-c.8lhgyyobpuslss6yfb5acwhaek?w=321&h=180&c=7&r=0&o=5&dpr=1.3&pid=1.7") fixed no-repeat;
            background-size: cover;
        }
        .login-form {
            width: 240px;
            height: 220px;
            display: flex;
            flex-direction: column;
            padding: 40px;
            text-align: center;
            position: relative;
            z-index: 100;
            background: inherit;
            border-radius: 18px;
            overflow: hidden;
        }
        .login-form::before {
            content: "";
            width: calc(100% + 20px);
            height: calc(100% + 20px);
            background: inherit;
            box-shadow: inset 0 0 0 200px rgba(255, 255, 255, 0.25);
            position: absolute;
            top: -10px;
            left: -10px;
            z-index: -1;
            filter: blur(6px);
            overflow: hidden;
        }
        .login-form h2 {
            font-size: 18px;
            font-weight: 400;
            color: #3d5245;
        }
        .login-form input,
        .login-form button {
            margin: 6px 0;
            height: 36px;
            border: none;
            background-color: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            padding: 0 14px;
            color: #3d5245;
        }
        .login-form input::placeholder {
            color: #3d5245;
        }
        .login-form button {
            margin-top: 24px;
            background-color: rgba(57, 88, 69, 0.4);
            color: white;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: 0.4s;
        }
        .login-form button:hover {
            background-color: rgba(12, 80, 38, 0.67);
        }
        .login-form button::before,
        .login-form button::after {
            content: "";
            display: block;
            width: 80px;
            height: 100%;
            background: rgba(179, 255, 210, 0.5);
            opacity: 0.5;
            position: absolute;
            left: 0;
            top: 0;
            transform: skewx(-15deg);
            filter: blur(30px);
            overflow: hidden;
            transform: translatex(-100px);
        }
        .login-form button::after {
            width: 40px;
            background: rgba(179, 255, 210, 0.3);
            left: 60px;
            filter: blur(5px);
            opacity: 0;
        }
        .login-form button:hover::before {
            transition: 1s;
            transform: translatex(320px);
            opacity: 0.7;
        }
        .login-form button:hover::after {
            transition: 1s;
            transform: translatex(320px);
            opacity: 1;
        }
    </style>
</head>
<body>
    <div>
        <div class="container">
            <form action="#" class="login-form">
                <h2>登录</h2>
                <input type="text" name="username" placeholder="用户名">
                <input type="password" name="password" placeholder="密码">
                <button type="submit">登录</button>
            </form>
        </div>
    </div>
</body>
</html>

到此这篇关于html5登录玻璃界面特效的文章就介绍到这了,更多相关html5登录玻璃内容请搜索代码网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持代码网!

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com