loading22.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .sk-folding-cube {
  2. display: inline-block;
  3. width: 40px;
  4. height: 40px;
  5. position: relative;
  6. -webkit-transform: rotateZ(45deg);
  7. transform: rotateZ(45deg);
  8. }
  9. .sk-folding-cube .sk-cube {
  10. float: left;
  11. width: 50%;
  12. height: 50%;
  13. position: relative;
  14. -webkit-transform: scale(1.1);
  15. -ms-transform: scale(1.1);
  16. transform: scale(1.1);
  17. }
  18. .sk-folding-cube .sk-cube:before {
  19. content: '';
  20. position: absolute;
  21. top: 0;
  22. left: 0;
  23. width: 100%;
  24. height: 100%;
  25. background-color: #42b983; //可修改颜色
  26. -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both;
  27. animation: sk-foldCubeAngle 2.4s infinite linear both;
  28. -webkit-transform-origin: 100% 100%;
  29. -ms-transform-origin: 100% 100%;
  30. transform-origin: 100% 100%;
  31. }
  32. .sk-folding-cube .sk-cube2 {
  33. -webkit-transform: scale(1.1) rotateZ(90deg);
  34. transform: scale(1.1) rotateZ(90deg);
  35. }
  36. .sk-folding-cube .sk-cube3 {
  37. -webkit-transform: scale(1.1) rotateZ(180deg);
  38. transform: scale(1.1) rotateZ(180deg);
  39. }
  40. .sk-folding-cube .sk-cube4 {
  41. -webkit-transform: scale(1.1) rotateZ(270deg);
  42. transform: scale(1.1) rotateZ(270deg);
  43. }
  44. .sk-folding-cube .sk-cube2:before {
  45. -webkit-animation-delay: 0.3s;
  46. animation-delay: 0.3s;
  47. }
  48. .sk-folding-cube .sk-cube3:before {
  49. -webkit-animation-delay: 0.6s;
  50. animation-delay: 0.6s;
  51. }
  52. .sk-folding-cube .sk-cube4:before {
  53. -webkit-animation-delay: 0.9s;
  54. animation-delay: 0.9s;
  55. }
  56. @-webkit-keyframes sk-foldCubeAngle {
  57. 0%, 10% {
  58. -webkit-transform: perspective(140px) rotateX(-180deg);
  59. transform: perspective(140px) rotateX(-180deg);
  60. opacity: 0;
  61. } 25%, 75% {
  62. -webkit-transform: perspective(140px) rotateX(0deg);
  63. transform: perspective(140px) rotateX(0deg);
  64. opacity: 1;
  65. } 90%, 100% {
  66. -webkit-transform: perspective(140px) rotateY(180deg);
  67. transform: perspective(140px) rotateY(180deg);
  68. opacity: 0;
  69. }
  70. }
  71. @keyframes sk-foldCubeAngle {
  72. 0%, 10% {
  73. -webkit-transform: perspective(140px) rotateX(-180deg);
  74. transform: perspective(140px) rotateX(-180deg);
  75. opacity: 0;
  76. } 25%, 75% {
  77. -webkit-transform: perspective(140px) rotateX(0deg);
  78. transform: perspective(140px) rotateX(0deg);
  79. opacity: 1;
  80. } 90%, 100% {
  81. -webkit-transform: perspective(140px) rotateY(180deg);
  82. transform: perspective(140px) rotateY(180deg);
  83. opacity: 0;
  84. }
  85. }