zoukankan      html  css  js  c++  java
  • CSS3 晃动效果

    为自己的目标努力着,全身心投入一件事情。


    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>CSS3-晃动-效果</title>
    <style>
        .element{
          color: #f35626;
          background-image: -webkit-linear-gradient(92deg,#f35626,#feab3a);
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          -webkit-animation: hue 60s infinite linear;
          margin-bottom: 1.5rem;
          font-size: 3rem;
          font-weight: 100;
          line-height: 1;
          letter-spacing: -.05em;
        }
        .animated {
          -webkit-animation-duration: 3s;
          animation-duration: 3s;
          -webkit-animation-fill-mode: both;
          animation-fill-mode: both;
        }
        @-webkit-keyframes wobble {
          from {
            -webkit-transform: none;
            transform: none;
          }
        
          15% {
            -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
            transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
          }
        
          30% {
            -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
            transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
          }
        
          45% {
            -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
            transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
          }
        
          60% {
            -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
            transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
          }
        
          75% {
            -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
            transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
          }
        
          to {
            -webkit-transform: none;
            transform: none;
          }
        }    
        @keyframes wobble {
          from {
            -webkit-transform: none;
            transform: none;
          }
        
          15% {
            -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
            transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
          }
        
          30% {
            -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
            transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
          }
        
          45% {
            -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
            transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
          }
        
          60% {
            -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
            transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
          }
        
          75% {
            -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
            transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
          }
        
          to {
            -webkit-transform: none;
            transform: none;
          }
        }
        
        .wobble {
          -webkit-animation-name: wobble;
          animation-name: wobble;
        }
    </style>
    </head>
    <body>
        <div class="element animated wobble">wobble</div>
    </body>
    </html>
    View Code

  • 相关阅读:
    I.MX6ULL LED C程序(转自左忠凯)
    I.MX6ULL的LED汇编程序
    Linux中的信号
    springboot的模板引擎之简介区分(一)
    springboot常用Starter介绍
    springboot拦截器之Filter和拦截器Interceptor之间的区别(六)
    springboot拦截器之多个自定义拦截器Interceptor的执行顺序(五)
    springboot拦截器之自定义拦截器Interceptor以及新旧配置的对比(四)
    springboot拦截器之自定义监听器listener(三)
    springboot拦截器之自定义原生servlet(二)
  • 原文地址:https://www.cnblogs.com/LindaLiu/p/6336747.html
Copyright © 2011-2022 走看看