码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 全屏数字预加载动画


    效果图
    在这里插入图片描述

    代码

    DOCTYPE html>
    <html lang="en">
    
    <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>
            body {
                margin: 0;
                padding: 0;
                font-family: sans-serif;
            }
    
            .loader {
                position: absolute;
                top: 0;
                left: 0;
                height: 100%;
                background-color: #000;
            }
    
            section {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100vh;
                background-color: #fff;
                pointer-events: none;
                animation: fadeout .5s linear forwards;
                animation-delay: 11s;
            }
    
            @keyframes fadeout {
                from {
                    opacity: 1;
                }
    
                to {
                    opacity: 0;
                }
            }
    
            .count {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                font-size: 18vw;
                color: #fff;
                font-weight: 800;
                mix-blend-mode: difference;
                width: 550px;
                text-align: right;
            }
    
            .welcome {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100vh;
                display: flex;
                justify-content: center;
                align-items: center;
                color: #fff;
            }
    
            h2 {
                margin: 0;
                padding: 0;
                font-size: 10vw;
                color: #000;
            }
        style>
    head>
    
    <body>
        <div class="welcome">
            <h2>welcomeh2>
        div>
        <section>
            <div class="loader">div>
            <div class="count">div>
        section>
        <script src="https://code.jquery.com/jquery-3.3.1.min.js">script>
        <script>
            $(document).ready(() => {
                var count = 0;
                var counter = setInterval(() => {
                    if (count < 1001) {
                        $('.count').text(Math.round(count / 10) + '%')
                        $('.loader').css('width', count / 10 + '%')
                        count++
                    }
                    else {
                        clearInterval(counter)
                    }
                }, 10);
            })
        script>
    body>
    
    html>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
  • 相关阅读:
    【Python】牛客HJ43迷宫问题
    【答 疑 记 录】基于 经典全连接神经网络的(cat、dog、panda分类)
    java毕业生设计校园统一网络授课平台系统计算机源码+系统+mysql+调试部署+lw
    Python3中使用argparse模块解析命令行参数
    解读创邻科技Galaxybase LDBC-SNB测试报告
    springboot实现支付宝支付功能
    《HTML+CSS+JavaScript》之第20章 超链接样式
    C++基础——初始化列表
    Java语言的过滤数据流
    Redis常见数据类型下
  • 原文地址:https://blog.csdn.net/weixin_44368963/article/details/126166649
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号