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>
相关推荐
修己xj1 小时前
我用 AI 给自己写了一个 Markdown 编辑器,然后把它开源了
前端
FRing031 小时前
vue2干货总结2(v-bind、v-for、v-model、指令修饰符、v-bind操作class和style)
开发语言·前端·vue.js·vue2
幸运小猿1 小时前
模拟慢上传-处理超时重试image 丢失线上问题
前端·javascript·html
moshuying3 小时前
网购能买Token了!
前端
h_65432103 小时前
echarts实现柱状图加一条横线
前端·echarts
风骏时光牛马3 小时前
生成一个后端标题,只需要一个标题,不需要其他的任何文本。
前端
子非鱼@Itfuture3 小时前
关于前后端联调中登录状态/登录信息失效?
java·前端
郭小李3 小时前
openFeign入门
java·开发语言·前端
馒头不想说话3 小时前
AI当运营,帮你省人力
前端
梦曦i4 小时前
uni-app x下自研架构的工程化突围
前端·架构·uni-app x