小程序常用动画

新建一个animate.wxss,粘贴下面的代码,在app.wxss文件中引入该wxss文件,在需要使用动画的View对应的css中(animation: bounce 2s infinite;)调用。

@charset "UTF-8";

@keyframes bounce {

  from, 20%, 53%, 80%, to {

    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);

    transform: translate3d(0, 0, 0);

  }

  40%, 43% {

    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);

    transform: translate3d(0, -30px, 0);

  }

  70% {

    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);

    transform: translate3d(0, -15px, 0);

  }

  90% {

    transform: translate3d(0, -4px, 0);

  }

}

.bounce {

  animation-name: bounce;

  transform-origin: center bottom;

}

@keyframes flash {

  from, 50%, to {

    opacity: 1;

  }

  25%, 75% {

    opacity: 0;

  }

}

.flash {

  animation-name: flash;

}

@keyframes pulse {

  from {

    transform: scale3d(1, 1, 1);

  }

  50% {

    transform: scale3d(1.05, 1.05, 1.05);

  }

  to {

    transform: scale3d(1, 1, 1);

  }

}

.pulse {

  animation-name: pulse;

}

@keyframes rubberBand {

  from {

    transform: scale3d(1, 1, 1);

  }

  30% {

    transform: scale3d(1.25, 0.75, 1);

  }

  40% {

    transform: scale3d(0.75, 1.25, 1);

  }

  50% {

    transform: scale3d(1.15, 0.85, 1);

  }

  65% {

    transform: scale3d(0.95, 1.05, 1);

  }

  75% {

    transform: scale3d(1.05, 0.95, 1);

  }

  to {

    transform: scale3d(1, 1, 1);

  }

}

.rubberBand {

  animation-name: rubberBand;

}

@keyframes shake {

  from, to {

    transform: translate3d(0, 0, 0);

  }

  10%, 30%, 50%, 70%, 90% {

    transform: translate3d(-10px, 0, 0);

  }

  20%, 40%, 60%, 80% {

    transform: translate3d(10px, 0, 0);

  }

}

.shake {

  animation-name: shake;

}

@keyframes headShake {

  0% {

    transform: translateX(0);

  }

  6.5% {

    transform: translateX(-6px) rotateY(-9deg);

  }

  18.5% {

    transform: translateX(5px) rotateY(7deg);

  }

  31.5% {

    transform: translateX(-3px) rotateY(-5deg);

  }

  43.5% {

    transform: translateX(2px) rotateY(3deg);

  }

  50% {

    transform: translateX(0);

  }

}

.headShake {

  animation-timing-function: ease-in-out;

  animation-name: headShake;

}

@keyframes swing {

  20% {

    transform: rotate3d(0, 0, 1, 15deg);

  }

  40% {

    transform: rotate3d(0, 0, 1, -10deg);

  }

  60% {

    transform: rotate3d(0, 0, 1, 5deg);

  }

  80% {

    transform: rotate3d(0, 0, 1, -5deg);

  }

  to {

    transform: rotate3d(0, 0, 1, 0deg);

  }

}

.swing {

  transform-origin: top center;

  animation-name: swing;

}

@keyframes tada {

  from {

    transform: scale3d(1, 1, 1);

  }

  10%, 20% {

    transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);

  }

  30%, 50%, 70%, 90% {

    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);

  }

  40%, 60%, 80% {

    transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);

  }

  to {

    transform: scale3d(1, 1, 1);

  }

}

.tada {

  animation-name: tada;

}

@keyframes wobble {

  from {

    transform: translate3d(0, 0, 0);

  }

  15% {

    transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);

  }

  30% {

    transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);

  }

  45% {

    transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);

  }

  60% {

    transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);

  }

  75% {

    transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.wobble {

  animation-name: wobble;

}

@keyframes jello {

  from, 11.1%, to {

    transform: translate3d(0, 0, 0);

  }

  22.2% {

    transform: skewX(-12.5deg) skewY(-12.5deg);

  }

  33.3% {

    transform: skewX(6.25deg) skewY(6.25deg);

  }

  44.4% {

    transform: skewX(-3.125deg) skewY(-3.125deg);

  }

  55.5% {

    transform: skewX(1.5625deg) skewY(1.5625deg);

  }

  66.6% {

    transform: skewX(-0.78125deg) skewY(-0.78125deg);

  }

  77.7% {

    transform: skewX(0.390625deg) skewY(0.390625deg);

  }

  88.8% {

    transform: skewX(-0.1953125deg) skewY(-0.1953125deg);

  }

}

.jello {

  animation-name: jello;

  transform-origin: center;

}

@keyframes heartBeat {

  0% {

    transform: scale(1);

  }

  14% {

    transform: scale(1.3);

  }

  28% {

    transform: scale(1);

  }

  42% {

    transform: scale(1.3);

  }

  70% {

    transform: scale(1);

  }

}

.heartBeat {

  animation-name: heartBeat;

  animation-duration: 1.3s;

  animation-timing-function: ease-in-out;

}

@keyframes bounceIn {

  from, 20%, 40%, 60%, 80%, to {

    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);

  }

  0% {

    opacity: 0;

    transform: scale3d(0.3, 0.3, 0.3);

  }

  20% {

    transform: scale3d(1.1, 1.1, 1.1);

  }

  40% {

    transform: scale3d(0.9, 0.9, 0.9);

  }

  60% {

    opacity: 1;

    transform: scale3d(1.03, 1.03, 1.03);

  }

  80% {

    transform: scale3d(0.97, 0.97, 0.97);

  }

  to {

    opacity: 1;

    transform: scale3d(1, 1, 1);

  }

}

.bounceIn {

  animation-duration: 0.75s;

  animation-name: bounceIn;

}

@keyframes bounceInDown {

  from, 60%, 75%, 90%, to {

    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);

  }

  0% {

    opacity: 0;

    transform: translate3d(0, -3000px, 0);

  }

  60% {

    opacity: 1;

    transform: translate3d(0, 25px, 0);

  }

  75% {

    transform: translate3d(0, -10px, 0);

  }

  90% {

    transform: translate3d(0, 5px, 0);

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.bounceInDown {

  animation-name: bounceInDown;

}

@keyframes bounceInLeft {

  from, 60%, 75%, 90%, to {

    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);

  }

  0% {

    opacity: 0;

    transform: translate3d(-3000px, 0, 0);

  }

  60% {

    opacity: 1;

    transform: translate3d(25px, 0, 0);

  }

  75% {

    transform: translate3d(-10px, 0, 0);

  }

  90% {

    transform: translate3d(5px, 0, 0);

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.bounceInLeft {

  animation-name: bounceInLeft;

}

@keyframes bounceInRight {

  from, 60%, 75%, 90%, to {

    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);

  }

  from {

    opacity: 0;

    transform: translate3d(3000px, 0, 0);

  }

  60% {

    opacity: 1;

    transform: translate3d(-25px, 0, 0);

  }

  75% {

    transform: translate3d(10px, 0, 0);

  }

  90% {

    transform: translate3d(-5px, 0, 0);

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.bounceInRight {

  animation-name: bounceInRight;

}

@keyframes bounceInUp {

  from, 60%, 75%, 90%, to {

    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);

  }

  from {

    opacity: 0;

    transform: translate3d(0, 3000px, 0);

  }

  60% {

    opacity: 1;

    transform: translate3d(0, -20px, 0);

  }

  75% {

    transform: translate3d(0, 10px, 0);

  }

  90% {

    transform: translate3d(0, -5px, 0);

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.bounceInUp {

  animation-name: bounceInUp;

}

@keyframes bounceOut {

  20% {

    transform: scale3d(0.9, 0.9, 0.9);

  }

  50%, 55% {

    opacity: 1;

    transform: scale3d(1.1, 1.1, 1.1);

  }

  to {

    opacity: 0;

    transform: scale3d(0.3, 0.3, 0.3);

  }

}

.bounceOut {

  animation-duration: 0.75s;

  animation-name: bounceOut;

}

@keyframes bounceOutDown {

  20% {

    transform: translate3d(0, 10px, 0);

  }

  40%, 45% {

    opacity: 1;

    transform: translate3d(0, -20px, 0);

  }

  to {

    opacity: 0;

    transform: translate3d(0, 2000px, 0);

  }

}

.bounceOutDown {

  animation-name: bounceOutDown;

}

@keyframes bounceOutLeft {

  20% {

    opacity: 1;

    transform: translate3d(20px, 0, 0);

  }

  to {

    opacity: 0;

    transform: translate3d(-2000px, 0, 0);

  }

}

.bounceOutLeft {

  animation-name: bounceOutLeft;

}

@keyframes bounceOutRight {

  20% {

    opacity: 1;

    transform: translate3d(-20px, 0, 0);

  }

  to {

    opacity: 0;

    transform: translate3d(2000px, 0, 0);

  }

}

.bounceOutRight {

  animation-name: bounceOutRight;

}

@keyframes bounceOutUp {

  20% {

    transform: translate3d(0, -10px, 0);

  }

  40%, 45% {

    opacity: 1;

    transform: translate3d(0, 20px, 0);

  }

  to {

    opacity: 0;

    transform: translate3d(0, -2000px, 0);

  }

}

.bounceOutUp {

  animation-name: bounceOutUp;

}

@keyframes fadeIn {

  from {

    opacity: 0;

  }

  to {

    opacity: 1;

  }

}

.fadeIn {

  animation-name: fadeIn;

}

@keyframes fadeInDown {

  from {

    opacity: 0;

    transform: translate3d(0, -100%, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInDown {

  animation-name: fadeInDown;

}

@keyframes fadeInDownBig {

  from {

    opacity: 0;

    transform: translate3d(0, -2000px, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInDownBig {

  animation-name: fadeInDownBig;

}

@keyframes fadeInLeft {

  from {

    opacity: 0;

    transform: translate3d(-100%, 0, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInLeft {

  animation-name: fadeInLeft;

}

@keyframes fadeInLeftBig {

  from {

    opacity: 0;

    transform: translate3d(-2000px, 0, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInLeftBig {

  animation-name: fadeInLeftBig;

}

@keyframes fadeInRight {

  from {

    opacity: 0;

    transform: translate3d(100%, 0, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInRight {

  animation-name: fadeInRight;

}

@keyframes fadeInRightBig {

  from {

    opacity: 0;

    transform: translate3d(2000px, 0, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInRightBig {

  animation-name: fadeInRightBig;

}

@keyframes fadeInUp {

  from {

    opacity: 0;

    transform: translate3d(0, 100%, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInUp {

  animation-name: fadeInUp;

}

@keyframes fadeInUpBig {

  from {

    opacity: 0;

    transform: translate3d(0, 2000px, 0);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.fadeInUpBig {

  animation-name: fadeInUpBig;

}

@keyframes fadeOut {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

  }

}

.fadeOut {

  animation-name: fadeOut;

}

@keyframes fadeOutDown {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(0, 100%, 0);

  }

}

.fadeOutDown {

  animation-name: fadeOutDown;

}

@keyframes fadeOutDownBig {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(0, 2000px, 0);

  }

}

.fadeOutDownBig {

  animation-name: fadeOutDownBig;

}

@keyframes fadeOutLeft {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(-100%, 0, 0);

  }

}

.fadeOutLeft {

  animation-name: fadeOutLeft;

}

@keyframes fadeOutLeftBig {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(-2000px, 0, 0);

  }

}

.fadeOutLeftBig {

  animation-name: fadeOutLeftBig;

}

@keyframes fadeOutRight {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(100%, 0, 0);

  }

}

.fadeOutRight {

  animation-name: fadeOutRight;

}

@keyframes fadeOutRightBig {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(2000px, 0, 0);

  }

}

.fadeOutRightBig {

  animation-name: fadeOutRightBig;

}

@keyframes fadeOutUp {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(0, -100%, 0);

  }

}

.fadeOutUp {

  animation-name: fadeOutUp;

}

@keyframes fadeOutUpBig {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(0, -2000px, 0);

  }

}

.fadeOutUpBig {

  animation-name: fadeOutUpBig;

}

@keyframes flip {

  from {

    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);

    animation-timing-function: ease-out;

  }

  40% {

    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);

    animation-timing-function: ease-out;

  }

  50% {

    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);

    animation-timing-function: ease-in;

  }

  80% {

    transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);

    animation-timing-function: ease-in;

  }

  to {

    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);

    animation-timing-function: ease-in;

  }

}

.animated.flip {

  backface-visibility: visible;

  animation-name: flip;

}

@keyframes flipInX {

  from {

    transform: perspective(400px) rotate3d(1, 0, 0, 90deg);

    animation-timing-function: ease-in;

    opacity: 0;

  }

  40% {

    transform: perspective(400px) rotate3d(1, 0, 0, -20deg);

    animation-timing-function: ease-in;

  }

  60% {

    transform: perspective(400px) rotate3d(1, 0, 0, 10deg);

    opacity: 1;

  }

  80% {

    transform: perspective(400px) rotate3d(1, 0, 0, -5deg);

  }

  to {

    transform: perspective(400px);

  }

}

.flipInX {

  backface-visibility: visible !important;

  animation-name: flipInX;

}

@keyframes flipInY {

  from {

    transform: perspective(400px) rotate3d(0, 1, 0, 90deg);

    animation-timing-function: ease-in;

    opacity: 0;

  }

  40% {

    transform: perspective(400px) rotate3d(0, 1, 0, -20deg);

    animation-timing-function: ease-in;

  }

  60% {

    transform: perspective(400px) rotate3d(0, 1, 0, 10deg);

    opacity: 1;

  }

  80% {

    transform: perspective(400px) rotate3d(0, 1, 0, -5deg);

  }

  to {

    transform: perspective(400px);

  }

}

.flipInY {

  backface-visibility: visible !important;

  animation-name: flipInY;

}

@keyframes flipOutX {

  from {

    transform: perspective(400px);

  }

  30% {

    transform: perspective(400px) rotate3d(1, 0, 0, -20deg);

    opacity: 1;

  }

  to {

    transform: perspective(400px) rotate3d(1, 0, 0, 90deg);

    opacity: 0;

  }

}

.flipOutX {

  animation-duration: 0.75s;

  animation-name: flipOutX;

  backface-visibility: visible !important;

}

@keyframes flipOutY {

  from {

    transform: perspective(400px);

  }

  30% {

    transform: perspective(400px) rotate3d(0, 1, 0, -15deg);

    opacity: 1;

  }

  to {

    transform: perspective(400px) rotate3d(0, 1, 0, 90deg);

    opacity: 0;

  }

}

.flipOutY {

  animation-duration: 0.75s;

  backface-visibility: visible !important;

  animation-name: flipOutY;

}

@keyframes lightSpeedIn {

  from {

    transform: translate3d(100%, 0, 0) skewX(-30deg);

    opacity: 0;

  }

  60% {

    transform: skewX(20deg);

    opacity: 1;

  }

  80% {

    transform: skewX(-5deg);

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.lightSpeedIn {

  animation-name: lightSpeedIn;

  animation-timing-function: ease-out;

}

@keyframes lightSpeedOut {

  from {

    opacity: 1;

  }

  to {

    transform: translate3d(100%, 0, 0) skewX(30deg);

    opacity: 0;

  }

}

.lightSpeedOut {

  animation-name: lightSpeedOut;

  animation-timing-function: ease-in;

}

@keyframes rotateIn {

  from {

    transform-origin: center;

    transform: rotate3d(0, 0, 1, -200deg);

    opacity: 0;

  }

  to {

    transform-origin: center;

    transform: translate3d(0, 0, 0);

    opacity: 1;

  }

}

.rotateIn {

  animation-name: rotateIn;

}

@keyframes rotateInDownLeft {

  from {

    transform-origin: left bottom;

    transform: rotate3d(0, 0, 1, -45deg);

    opacity: 0;

  }

  to {

    transform-origin: left bottom;

    transform: translate3d(0, 0, 0);

    opacity: 1;

  }

}

.rotateInDownLeft {

  animation-name: rotateInDownLeft;

}

@keyframes rotateInDownRight {

  from {

    transform-origin: right bottom;

    transform: rotate3d(0, 0, 1, 45deg);

    opacity: 0;

  }

  to {

    transform-origin: right bottom;

    transform: translate3d(0, 0, 0);

    opacity: 1;

  }

}

.rotateInDownRight {

  animation-name: rotateInDownRight;

}

@keyframes rotateInUpLeft {

  from {

    transform-origin: left bottom;

    transform: rotate3d(0, 0, 1, 45deg);

    opacity: 0;

  }

  to {

    transform-origin: left bottom;

    transform: translate3d(0, 0, 0);

    opacity: 1;

  }

}

.rotateInUpLeft {

  animation-name: rotateInUpLeft;

}

@keyframes rotateInUpRight {

  from {

    transform-origin: right bottom;

    transform: rotate3d(0, 0, 1, -90deg);

    opacity: 0;

  }

  to {

    transform-origin: right bottom;

    transform: translate3d(0, 0, 0);

    opacity: 1;

  }

}

.rotateInUpRight {

  animation-name: rotateInUpRight;

}

@keyframes rotateOut {

  from {

    transform-origin: center;

    opacity: 1;

  }

  to {

    transform-origin: center;

    transform: rotate3d(0, 0, 1, 200deg);

    opacity: 0;

  }

}

.rotateOut {

  animation-name: rotateOut;

}

@keyframes rotateOutDownLeft {

  from {

    transform-origin: left bottom;

    opacity: 1;

  }

  to {

    transform-origin: left bottom;

    transform: rotate3d(0, 0, 1, 45deg);

    opacity: 0;

  }

}

.rotateOutDownLeft {

  animation-name: rotateOutDownLeft;

}

@keyframes rotateOutDownRight {

  from {

    transform-origin: right bottom;

    opacity: 1;

  }

  to {

    transform-origin: right bottom;

    transform: rotate3d(0, 0, 1, -45deg);

    opacity: 0;

  }

}

.rotateOutDownRight {

  animation-name: rotateOutDownRight;

}

@keyframes rotateOutUpLeft {

  from {

    transform-origin: left bottom;

    opacity: 1;

  }

  to {

    transform-origin: left bottom;

    transform: rotate3d(0, 0, 1, -45deg);

    opacity: 0;

  }

}

.rotateOutUpLeft {

  animation-name: rotateOutUpLeft;

}

@keyframes rotateOutUpRight {

  from {

    transform-origin: right bottom;

    opacity: 1;

  }

  to {

    transform-origin: right bottom;

    transform: rotate3d(0, 0, 1, 90deg);

    opacity: 0;

  }

}

.rotateOutUpRight {

  animation-name: rotateOutUpRight;

}

@keyframes hinge {

  0% {

    transform-origin: top left;

    animation-timing-function: ease-in-out;

  }

  20%, 60% {

    transform: rotate3d(0, 0, 1, 80deg);

    transform-origin: top left;

    animation-timing-function: ease-in-out;

  }

  40%, 80% {

    transform: rotate3d(0, 0, 1, 60deg);

    transform-origin: top left;

    animation-timing-function: ease-in-out;

    opacity: 1;

  }

  to {

    transform: translate3d(0, 700px, 0);

    opacity: 0;

  }

}

.hinge {

  animation-duration: 2s;

  animation-name: hinge;

}

@keyframes jackInTheBox {

  from {

    opacity: 0;

    transform: scale(0.1) rotate(30deg);

    transform-origin: center bottom;

  }

  50% {

    transform: rotate(-10deg);

  }

  70% {

    transform: rotate(3deg);

  }

  to {

    opacity: 1;

    transform: scale(1);

  }

}

.jackInTheBox {

  animation-name: jackInTheBox;

}

@keyframes rollIn {

  from {

    opacity: 0;

    transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);

  }

  to {

    opacity: 1;

    transform: translate3d(0, 0, 0);

  }

}

.rollIn {

  animation-name: rollIn;

}

@keyframes rollOut {

  from {

    opacity: 1;

  }

  to {

    opacity: 0;

    transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);

  }

}

.rollOut {

  animation-name: rollOut;

}

@keyframes zoomIn {

  from {

    opacity: 0;

    transform: scale3d(0.3, 0.3, 0.3);

  }

  50% {

    opacity: 1;

  }

}

.zoomIn {

  animation-name: zoomIn;

}

@keyframes zoomInDown {

  from {

    opacity: 0;

    transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);

    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  }

  60% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);

    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);

  }

}

.zoomInDown {

  animation-name: zoomInDown;

}

@keyframes zoomInLeft {

  from {

    opacity: 0;

    transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);

    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  }

  60% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);

    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);

  }

}

.zoomInLeft {

  animation-name: zoomInLeft;

}

@keyframes zoomInRight {

  from {

    opacity: 0;

    transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);

    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  }

  60% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);

    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);

  }

}

.zoomInRight {

  animation-name: zoomInRight;

}

@keyframes zoomInUp {

  from {

    opacity: 0;

    transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);

    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  }

  60% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);

    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);

  }

}

.zoomInUp {

  animation-name: zoomInUp;

}

@keyframes zoomOut {

  from {

    opacity: 1;

  }

  50% {

    opacity: 0;

    transform: scale3d(0.3, 0.3, 0.3);

  }

  to {

    opacity: 0;

  }

}

.zoomOut {

  animation-name: zoomOut;

}

@keyframes zoomOutDown {

  40% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);

    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  }

  to {

    opacity: 0;

    transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);

    transform-origin: center bottom;

    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);

  }

}

.zoomOutDown {

  animation-name: zoomOutDown;

}

@keyframes zoomOutLeft {

  40% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);

  }

  to {

    opacity: 0;

    transform: scale(0.1) translate3d(-2000px, 0, 0);

    transform-origin: left center;

  }

}

.zoomOutLeft {

  animation-name: zoomOutLeft;

}

@keyframes zoomOutRight {

  40% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);

  }

  to {

    opacity: 0;

    transform: scale(0.1) translate3d(2000px, 0, 0);

    transform-origin: right center;

  }

}

.zoomOutRight {

  animation-name: zoomOutRight;

}

@keyframes zoomOutUp {

  40% {

    opacity: 1;

    transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);

    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  }

  to {

    opacity: 0;

    transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);

    transform-origin: center bottom;

    animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);

  }

}

.zoomOutUp {

  animation-name: zoomOutUp;

}

@keyframes slideInDown {

  from {

    transform: translate3d(0, -100%, 0);

    visibility: visible;

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.slideInDown {

  animation-name: slideInDown;

}

@keyframes slideInLeft {

  from {

    transform: translate3d(-100%, 0, 0);

    visibility: visible;

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.slideInLeft {

  animation-name: slideInLeft;

}

@keyframes slideInRight {

  from {

    transform: translate3d(100%, 0, 0);

    visibility: visible;

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.slideInRight {

  animation-name: slideInRight;

}

@keyframes slideInUp {

  from {

    transform: translate3d(0, 100%, 0);

    visibility: visible;

  }

  to {

    transform: translate3d(0, 0, 0);

  }

}

.slideInUp {

  animation-name: slideInUp;

}

@keyframes slideOutDown {

  from {

    transform: translate3d(0, 0, 0);

  }

  to {

    visibility: hidden;

    transform: translate3d(0, 100%, 0);

  }

}

.slideOutDown {

  animation-name: slideOutDown;

}

@keyframes slideOutLeft {

  from {

    transform: translate3d(0, 0, 0);

  }

  to {

    visibility: hidden;

    transform: translate3d(-100%, 0, 0);

  }

}

.slideOutLeft {

  animation-name: slideOutLeft;

}

@keyframes slideOutRight {

  from {

    transform: translate3d(0, 0, 0);

  }

  to {

    visibility: hidden;

    transform: translate3d(100%, 0, 0);

  }

}

.slideOutRight {

  animation-name: slideOutRight;

}

@keyframes slideOutUp {

  from {

    transform: translate3d(0, 0, 0);

  }

  to {

    visibility: hidden;

    transform: translate3d(0, -100%, 0);

  }

}

.slideOutUp {

  animation-name: slideOutUp;

}

.animated {

  animation-duration: 1s;

  animation-fill-mode: both;

}

.animated.infinite {

  animation-iteration-count: infinite;

}

.animated.delay-1s {

  animation-delay: 1s;

}

.animated.delay-2s {

  animation-delay: 2s;

}

.animated.delay-3s {

  animation-delay: 3s;

}

.animated.delay-4s {

  animation-delay: 4s;

}

.animated.delay-5s {

  animation-delay: 5s;

}

.animated.fast {

  animation-duration: 800ms;

}

.animated.faster {

  animation-duration: 500ms;

}

.animated.slow {

  animation-duration: 2s;

}

.animated.slower {

  animation-duration: 3s;

}

@media (prefers-reduced-motion) {

  .animated {

    animation: unset !important;

    transition: none !important;

  }

}

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,039评论 6 498
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,223评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 161,916评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,009评论 1 291
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,030评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,011评论 1 295
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,934评论 3 416
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,754评论 0 271
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,202评论 1 309
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,433评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,590评论 1 346
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,321评论 5 342
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,917评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,568评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,738评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,583评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,482评论 2 352

推荐阅读更多精彩内容

  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    love2013阅读 2,314评论 0 11
  • 看了很多视频、文章,最后却通通忘记了,别人的知识依旧是别人的,自己却什么都没获得。此系列文章旨在加深自己的印象,因...
    DCbryant阅读 1,859评论 0 4
  • CSS转换 CSS3 Transform(让元素在一个坐标系统中变形,可移动、旋转和缩放元素)transform ...
    Leophen阅读 896评论 0 1
  • 《只管去做》这是一本书的名称,今天刚到手,还没来的及打开,这是一本很有能量的书。 买这本书是看到朋友圈一位社群高手...
    wine8188阅读 129评论 0 1
  • 大家好,我是吴斯阵,拥有丰富的互联网营销实战经验,专注于打造最简单、最有效、最快速的互联网创业系统。乐于为大家分享...
    吴斯阵创业频道阅读 228评论 0 0