shake.css 879 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*抖动动画*/
  2. @keyframes shake {
  3. 10%,
  4. 90% {
  5. transform: translate3d(-1px, 0 0);
  6. }
  7. 20%,
  8. 80% {
  9. transform: translate3d(2px, 0, 0);
  10. }
  11. 30%,
  12. 50%,
  13. 70% {
  14. transform: translate3d(-4px, 0, 0);
  15. }
  16. 40%,
  17. 60% {
  18. transform: translate3d(4px, 0, 0);
  19. }
  20. }
  21. .apply-shake {
  22. animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  23. }
  24. /*翻转动画*/
  25. @keyframes rotate {
  26. 0% {
  27. transform: rotateY(0deg);
  28. }
  29. 100% {
  30. transform: rotateY(10deg);
  31. }
  32. }
  33. @keyframes rotateBack {
  34. 0% {
  35. transform: rotateY(10deg);
  36. }
  37. 100% {
  38. transform: rotateY(0deg);
  39. }
  40. }
  41. .overturn-shake {
  42. animation: rotate 0.8s ease-in-out 1;
  43. animation-fill-mode: forwards;
  44. }
  45. .overturn-back-shake {
  46. animation: rotateBack 0.8s ease-in-out 1;
  47. animation-fill-mode: forwards;
  48. }