欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

抖动效果实现

程序员文章站 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>