zoukankan      html  css  js  c++  java
  • 虾米loop 摇头代码

    .head{
    position: absolute;
    -webkit-animation: shake 1s infinite;
    -webkit-transform-origin: center bottom;
    }
    @-webkit-keyframes shake{
    0% {
    -webkit-transform:rotate(-5deg);
    }
    50% {
    -webkit-transform:rotate(5deg);
    }
    100% {
    -webkit-transform:rotate(-5deg);
    }
    }
    

    CSS3 @keyframes 用法:
    http://www.w3school.com.cn/cssref/pr_keyframes.asp

    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8">
      <title>JS Bin</title>
    <style>
    .head{
      position: absolute;
      -webkit-animation: shake 1s infinite;
      -webkit-transform-origin: center bottom;
    }
    @-webkit-keyframes shake{
      0% {
        -webkit-transform:rotate(-5deg);
      }
      50% {
        -webkit-transform:rotate(5deg);
      }
      100% {
        -webkit-transform:rotate(-5deg);
      }
    }}
    }
    </style>  
    </head>
    <body>
    <div class="head"><img src="http://img.xiami.net/res/loop/img/avatar/head_back_girl.png" class="head_img"></div>
    </body>
    </html>
    

    在线DEMO: http://jsbin.com/vaqicejapa

  • 相关阅读:
    咨询
    xcode技巧
    礼仪
    asi 网络框架
    iOS 开发问题 书籍 价值 改名 创业大赛app
    PS,UI,美工
    运营推广
    多线程 并发 文章
    手机技巧 文章
    javaScript 类文章
  • 原文地址:https://www.cnblogs.com/zlog/p/5388070.html
Copyright © 2011-2022 走看看