test.wxss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .button {
  2. width: 100%;
  3. height: 100rpx;
  4. position: absolute;
  5. background-color: red;
  6. }
  7. .sk-wandering-cubes .sk-cube {
  8. background-color: #67cf22;
  9. width: 20rpx;
  10. height: 20rpx;
  11. position: absolute;
  12. top: 0;
  13. left: 0;
  14. }
  15. .sk-wandering-cubes .sk-cube2 {
  16. -webkit-animation-delay: -0.9s;
  17. animation-delay: -0.9s;
  18. }
  19. @-webkit-keyframes sk-wanderingCube {
  20. 0% {
  21. -webkit-transform: rotate(0deg);
  22. transform: rotate(0deg);
  23. }
  24. 25% {
  25. -webkit-transform: translateX(60rpx) rotate(-90deg) scale(0.5);
  26. transform: translateX(60rpx) rotate(-90deg) scale(0.5);
  27. }
  28. 50% {
  29. /* Hack to make FF rotate in the right direction */
  30. -webkit-transform: translateX(60rpx) translateY(60rpx) rotate(-179deg);
  31. transform: translateX(60rpx) translateY(60rpx) rotate(-179deg);
  32. }
  33. 50.1% {
  34. -webkit-transform: translateX(60rpx) translateY(60rpx) rotate(-180deg);
  35. transform: translateX(60rpx) translateY(60rpx) rotate(-180deg);
  36. }
  37. 75% {
  38. -webkit-transform: translateX(0) translateY(60rpx) rotate(-270deg) scale(0.5);
  39. transform: translateX(0) translateY(60rpx) rotate(-270deg) scale(0.5);
  40. }
  41. 100% {
  42. -webkit-transform: rotate(-360deg);
  43. transform: rotate(-360deg);
  44. }
  45. }
  46. .play {
  47. -webkit-animation: sk-wanderingCube 1.8s ease-in-out -1.8s infinite both;
  48. animation: sk-wanderingCube 1.8s ease-in-out -1.8s infinite both;
  49. }
  50. .restart {
  51. animation: sk-wanderingCube 5s infinite ease;
  52. }
  53. .pause {
  54. animation-play-state: paused;
  55. }