zoukankan      html  css  js  c++  java
  • Css Tada动画效果(Css Tada Animation Effect)--- shake抖动效果

    <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="utf-8" />
        <!--如果是IE 就以标准渲染-->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    
    
        <meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=0.5, maximum-scale=5.0' />
    
        <!--当前页面的三要素-->
        <title>demo</title>
        <meta name="description" content="demo" />
        <meta http-equiv="keywords" content="demo" />
        <!-- css -->
        <style>
          .animated {
            300px;
            height:300px;
            background:url(./aaa.png) no-repeat center/cover;
            padding-top: 95px;
            margin: 60px auto;
            -webkit-animation-duration: 10s;
            animation-duration: 10s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
          }
        
          @-webkit-keyframes tada {
            0% {
              -webkit-transform: scale(1);
            }
        
            10%,
            20% {
              -webkit-transform: scale(0.9) rotate(-3deg);
            }
        
            30%,
            50%,
            70%,
            90% {
              -webkit-transform: scale(1.1) rotate(3deg);
            }
        
            40%,
            60%,
            80% {
              -webkit-transform: scale(1.1) rotate(-3deg);
            }
        
            100% {
              -webkit-transform: scale(1) rotate(0);
            }
          }
        
          @keyframes tada {
            0% {
              transform: scale(1);
            }
        
            10%,
            20% {
              transform: scale(0.9) rotate(-3deg);
            }
        
            30%,
            50%,
            70%,
            90% {
              transform: scale(1.1) rotate(3deg);
            }
        
            40%,
            60%,
            80% {
              transform: scale(1.1) rotate(-3deg);
            }
        
            100% {
              transform: scale(1) rotate(0);
            }
          }
        
          .tada {
            -webkit-animation-name: tada;
            animation-name: tada;
          }
        </style>
    </head>
    
    <body>
     
      <div id="animated-example" class="animated tada"></div>
      <button onclick="myFunction()">Reload page</button>
      <script>
        function myFunction() {
          location.reload();
        }
      </script>
    </body>
    
    </html>

    效果图:

  • 相关阅读:
    LuoguP2765 魔术球问题
    LuoguP1402 酒店之王
    luoguP4313 文理分科
    玲珑杯 1138
    codeforces 822 D. My pretty girl Noora(dp+素数筛)
    codeforces 822 C. Hacker, pack your bags!(思维+dp)
    51nod 1376 最长递增子序列的数量(不是dp哦,线段树 +  思维)
    hdu4565 So Easy!(矩阵快速幂)
    atcode E
    atcoder D
  • 原文地址:https://www.cnblogs.com/pwindy/p/13042444.html
Copyright © 2011-2022 走看看