css3之animation 提交按钮简单的动画

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body{
            width: 100vw;
            height: 100vh;
            display: grid;
            grid-template: 1fr/1fr;
        }
        .btn{
            width: 200px;
            height: 50px;
            text-align: center;
            line-height: 50px;
            color:green;
            justify-self: center;
            align-self: center;
        }
        .btn::after{
            content: '';
            width: 3px;
            height: 3px;
            display: inline-block;
            animation-name: yd;
            animation-duration: 1s;
            animation-iteration-count: infinite;
        }
        @keyframes yd {
            from{
                box-shadow: none;
            }
            30%{
                box-shadow: 3px 0 0 currentColor;
            }
            60%{
                box-shadow: 3px 0 0 currentColor,9px 0 0 currentColor;
            }
            90%{
                box-shadow: 3px 0 0 currentColor,9px 0 0 currentColor,15px 0 0 currentColor;
            }
            to{
                box-shadow: 3px 0 0 currentColor,9px 0 0 currentColor,15px 0 0 currentColor;
            }
        }
    </style>
</head>
<body>
    <button class="btn">提交</button>
</body>
</html>
相关推荐
A死灵圣法师8 分钟前
同一个接口,掉n次,取消上次请求
前端
前端涂涂12 分钟前
JavaScript面试宝典
前端·javascript
卖报的小行家_17 分钟前
读《Vue.js设计与实现》第四章·响应系统的作用与实现
前端
七月丶19 分钟前
🚀 前端缓存踩坑指南:如何优雅地解决浏览器缓存问题?
前端
沉默王二20 分钟前
更快更强!字节满血版DeepSeek在IDEA中真的爽!
java·前端·程序员
掘金酱26 分钟前
👏 用idea传递无限可能!AI FOR CODE挑战赛「创意赛道」作品提交指南
前端·人工智能·trae
Hamm28 分钟前
咦,你的Git仓库贡献者里怎么有这么多大佬???
前端·git·github
陈卓4101 小时前
Redis-限流方案
前端·redis·bootstrap
顾林海1 小时前
Flutter Dart 运算符全面解析
android·前端
七月丶1 小时前
🚀 现代 Web 开发:如何优雅地管理前端版本信息?
前端