zoukankan      html  css  js  c++  java
  • css3动画

    css3改变背景色和位置的动画时层上一定要加 position:relative 

     

    css3 ie10以上支持 火狐支持 欧朋支持 苹果和谷歌支持但必须加-webkit-

    @keyframes myfirst{

           0%{background:red;left:0px;top:0px;}

         25%{background:yellow;left:0px;top:20px;}

         50%{background:blue;left:20px;top:20px;}

         75%{background:green;left:20px;top:0px;}

       100%{background:red;left:0px;top:0px;} 

    @-webkit-keyframes myfirst{

      0%{background:red;left:0px;top:0px;}

         25%{background:yellow;left:0px;top:20px;}

         50%{background:blue;left:20px;top:20px;}

         75%{background:green;left:20px;top:0px;}

       100%{background:red;left:0px;top:0px;} 

    .dd{

    200px;

    height:200px;

    background:red;

    position:relative;

    -webkit-animation:myfirst 2s linear 2s infinite 循环播放 alternate 逆向播放;

    -webkit-animation-play-state:running/paused;// 这个必须单独写 指定动画是否正在运行或已暂停 

    animation: myfirst 2s linear 2s infinite 循环播放 alternate 逆向播放;

    animation-play-state:running/paused;//这个必须单独写 指定动画是否正在运行或已暂停 

  • 相关阅读:
    G1(Garbage First)
    优化老年代参数的分析思路
    优化年轻代参数的分析思路
    频繁发生fullgc的原因和定位思路
    什么时候会触发老年代gc
    老年代回收器cms
    SQL的优化技巧
    常用前端性能优化
    刷新的方式
    遇到的一些坑
  • 原文地址:https://www.cnblogs.com/licuihua/p/5474185.html
Copyright © 2011-2022 走看看