抖动效果实现
程序员文章站
2022-04-28 11:28:36
...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>抖动效果</title>
</head>
<style>
.play{
animation: jump .65s cubic-bezier(1,-1.91,0,2.79) 0s infinite normal both running;
}
@keyframes jump {
0% {
text-shadow: none
}
25% {
text-shadow: -1px -1px 0 #ff0048,1px 1px 0 #3234ff
}
50% {
text-shadow: 1px -1px 0 #ff0048,-1px 1px 0 #3234ff
}
75% {
text-shadow: -1px 1px 0 #ff0048,1px -1px 0 #3234ff
}
100% {
text-shadow: 1px 1px 0 #ff0048,-1px -1px 0 #3234ff
}
}
</style>
<body>
<div class="play">hahaha</div>
</body>
</html>
上一篇: php怎么判断gif图片是否为动画?