码农知识堂 - 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>Documenttitle>
        <style>
            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
    
            #aniBox {
                display: flex;
                justify-content: center;
                align-items: center;
                min-height: 100vh;
                background-color: #0c1b21;
            }
    
            .loader {
                position: relative;
                width: 250px;
                height: 250px;
                filter: url(#gooey);
                animation: animate 16s linear infinite;
            }
    
            .loader i {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                display: block;
                transform: rotate(calc(45deg*var(--i)));
            }
    
            .loader i::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                width: 50px;
                height: 50px;
                background: linear-gradient(45deg, #fb4c4c, #ff0f07);
                border-radius: 50%;
                box-shadow: 0 0 20px hsl(352, 100%, 75%);
            }
    
            .rotate {
                animation: animate 4s ease-in-out infinite;
                animation-delay: calc(-0.2s*var(--j));
            }
    
            svg {
                height: 0;
                width: 0;
            }
    
            @keyframes animate {
                from {
                    transform: rotate(0deg);
                }
    
                to {
                    transform: rotate(360deg);
                }
            }
        style>
    head>
    
    <body>
        <section id="aniBox">
            <svg>
                <filter id="gooey">
                    <feGaussianBlur in="SourceGraphic" stdDeviation="10">feGaussianBlur>
                    <feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 21 -9">feColorMatrix>
                filter>
            svg>
        section>
        <script>
            let box = document.createElement('div');
            box.className = 'loader';
            aniBox.appendChild(box)
            for (let index = 1; index < 9; index++) {
                let i = document.createElement('i');
                i.style = '--i:' + index + ';';
                box.appendChild(i);
            }
            for (let index = 0; index < 5; index++) {
                let i = document.createElement('i');
                i.style = '--j:' + index + ';';
                i.className = 'rotate';
                box.appendChild(i);
            }
        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
  • 相关阅读:
    邦盛科技冲刺上市“冷思考”:身处红线边缘,达摩克利斯之剑高悬
    Docker三大核心概念(镜像、容器和仓库)与虚拟化
    《数据结构、算法与应用C++语言描述》-栈的应用-列车车厢重排问题
    【双十二预售】9.9元就能学《人工智能导论》!打卡赢红包,还有B站大会员等你领
    黑猫带你学Makefile第1篇:程序编译的过程
    MyBioSource Cyclin E1 多克隆抗体相关研究
    R语言简介|你对R语言了解多少?
    跨平台编程开发工具Xojo 2023 Release mac中文版功能介绍
    桥接模式(Bridge Pattern)
    Linux操作系统的内存使用方法详细解析
  • 原文地址:https://blog.csdn.net/weixin_44368963/article/details/126188787
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | 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号