分享一个好看的跳转页!

分享一个好看的跳转页!

小李
2021-07-09 / 0 评论 / 42 阅读 / 耗时: 30 ms / 正在检测是否收录...
前言

今天在逛 Joe 大佬的网站发现了一个好看的跳转页,就顺手扒了下来。

源代码
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover">
    <title>跳转中...</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html,
        body {
            height: 100%;
            color: #fff;
            font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
            text-align: center;
        }

        a {
            color: #fff;
            text-decoration: none;
            font-size: 14px;
        }

        body::before {
            content: "";
            pointer-events: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #ebebeb url(https://img.lixinbk.cn/2021/07/12/ea8c02b8a447e.jpg) no-repeat;
            background-size: 100% 100%;
            background-position: center;
            z-index: -1;
        }

        @media (max-width: 768px) {
            body::before {
                background-size: auto 100%;

            }
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        h2 {
            font-size: 60px;
            font-weight: 700;
            margin-bottom: 30px;
        }

        p {
            font-size: 18px;
            margin-bottom: 30px;
        }
    </style>
</head>

<body>
    <div>
        <h2>www.lixinbk.cn</h2>
        <p>请使用上方域名访问,<strong>3</strong> 秒后跳转</p>
        <a href="https://beian.miit.gov.cn" target="_blank" rel="noopener noreferrer">晋ICP备20006810号-1</a>
    </div>
    <script>
        let time = 3
        let timer = setInterval(() => {
            time--
            document.querySelector("strong").innerHTML = time
            if (time <= 0) {
                window.location.href = 'https://www.lixinbk.cn'
                clearInterval(timer)
            }
        }, 1000);
    </script>
</body>

</html>
演示地址

2

评论区 (0)

取消