<!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>
css3之animation 提交按钮简单的动画
花开花落的博客2023-08-27 15:57
相关推荐
太阳花ˉ5 分钟前
html+css+js实现step进度条效果小白学习日记1 小时前
【复习】HTML常用标签<table>丁总学Java1 小时前
微信小程序-npm支持-如何使用npm包yanlele2 小时前
前瞻 - 盘点 ES2025 已经定稿的语法规范懒羊羊大王呀2 小时前
CSS——属性值计算DOKE2 小时前
VSCode终端:提升命令行使用体验xgq2 小时前
使用File System Access API 直接读写本地文件用户3157476081352 小时前
前端之路-了解原型和原型链永远不打烊2 小时前
librtmp 原生API做直播推流北极小狐2 小时前
浏览器事件处理机制:从硬件中断到事件驱动