惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
F
Fortinet All Blogs
小众软件
小众软件
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
有赞技术团队
有赞技术团队
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
A
About on SuperTechFans
I
InfoQ
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog

WishMeLz - JS

Electron 主进程起一个可用的 HTTPS 静态服务器 - WishMeLz 某x面板每月自动重置流量功能 - WishMeLz ANSI 字体在前端展示 Jenkins日志 - WishMeLz 获取视频某一秒的截图 - WishMeLz 金额大写 - WishMeLz markdown 编辑器 md编辑器 - WishMeLz 零宽非连接符 [ZWNJ] U+200C - WishMeLz SSE(Server-Sent Events) - WishMeLz 文件处理 - WishMeLz
随机渐变背景 - WishMeLz
WishMeLz · 2026-06-01 · via WishMeLz - JS

随机渐变背景

 <style>
        html,
        body {
            margin: 0;
        }
        body:after {
            content: 'click to update';
            font-size: 0.8em;
            color: rgba(0, 0, 0, 0.3);
            position: fixed;
            width: 100%;
            bottom: 1em;
            text-align: center;
        }

        #cloud {
            overflow: hidden;
            width: 1px;
            height: 1px;
            transform: translate(-100%, -100%);
            border-radius: 50%;
            filter: url(#filter);
        }
    </style>
    <body>
        <div id="cloud"></div>

        <svg width="0">
            <filter id="filter">
                <feTurbulence
                    type="fractalNoise"
                    baseFrequency=".01"
                    numOctaves="10"
                />
                <feDisplacementMap in="SourceGraphic" scale="240" />
            </filter>
        </svg>
    </body>

    <script>
        function rn(from, to) {
            return ~~(Math.random() * (to - from + 1)) + from
        }

        function rs() {
            return arguments[rn(1, arguments.length) - 1]
        }

        function boxShadows(max) {
            let ret = []
            for (let i = 0; i < max; ++i) {
                ret.push(`
      ${rn(1, 100)}vw ${rn(1, 100)}vh ${rn(20, 40)}vmin ${rn(1, 20)}vmin
      ${rs('#11cbd7', '#c6f1e7', '#f0fff3', '#fa4659')}
    `)
            }
            return ret.join(',')
        }

        const cloud = document.querySelector('#cloud')
        function update() {
            cloud.style.boxShadow = boxShadows(100)
        }

        window.addEventListener('load', update)
        document.addEventListener('click', update)
    </script>

最后编辑时间为: July 17th , 2024 at 04:10 pm
本文由 Wish 创作,采用 知识共享署名 4.0 国际许可协议进行许可
可自由转载、引用,但需署名作者且注明文章出处

标签 : 无标签