<!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>
转载:https://blog.csdn.net/SherryStar/article/details/101379556
查看评论