CSS水波纹特效

xml 复制代码
    <div class="mask">
        <div class="word">Loading...</div>
        <div class="word">Loading...</div>
    </div>
css 复制代码
    .mask {
        position: relative;
        height: 100vh;
        background-color: #000;
        .word {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-size: 80px;
            &:nth-child(1) {
                color: transparent;
                -webkit-text-stroke: 2px #03a9f4;
            }
            &:nth-child(2) {
                color: #03a9f4;
                animation: water 2s ease-in-out infinite alternate;
            }
        }
    }
    @keyframes water {
        0% {
            clip-path: polygon(31% 61%, 53% 65%, 77% 67%, 100% 68%, 100% 100%, 0% 100%, 0% 35%, 13% 52%)
        }
        100% {
            clip-path: polygon(51% 68%, 71% 59%, 86% 44%, 100% 24%, 100% 100%, 0% 100%, 0% 72%, 28% 71%)
        }
    }
相关推荐
weibkreuz4 分钟前
收集表单数据@10
开发语言·前端·javascript
hboot29 分钟前
别再被 TS 类型冲突折磨了!一文搞懂类型合并规则
前端·typescript
在西安放羊的牛油果33 分钟前
浅谈 import.meta.env 和 process.env 的区别
前端·vue.js·node.js
鹏北海37 分钟前
从弹窗变胖到 npm 依赖管理:一次完整的问题排查记录
前端·npm·node.js
布列瑟农的星空38 分钟前
js中的using声明
前端
薛定谔的猫238 分钟前
Cursor 系列(2):使用心得
前端·ai编程·cursor
用户9047066835739 分钟前
后端问前端:我的接口请求花了多少秒?为啥那么慢,是你慢还是我慢?
前端
深念Y39 分钟前
仿B站项目 前端 4 首页 顶层导航栏
前端·vue·ai编程·导航栏·bilibili·ai开发
dragonZhang1 小时前
基于 Agent Skills 的 UI 重构实践:从 Demo 到主题化界面的升级之路
前端·ai编程·claude
王林不想说话1 小时前
提升工作效率的Utils
前端·javascript·typescript